You have to write a parser for the markup language you want to use and then still use DrawText()
There are some codes on this forum for TextGadgets based on the Canvas, though. Perhaps there's something you can use.
This for example doesn't use MarkUp, though, but behaves more like the ScintillaGadget where you add bits of text with their corresponding style.
http://www.purebasic.fr/english/viewtop ... vas+editor