FormatTextAreaText - GetTextAreaTextFormat?

BlitzMax Forums/MaxGUI Module/FormatTextAreaText - GetTextAreaTextFormat?

Chalky(Posted 2014) [#1]
I am trying to create a small WYSIWYG editor using a MaxGUI textarea gadget. I have worked out how to set selected text to BOLD, ITALIC and UNDERLINE. However, applying any of these removes the current formatting style. I therefore need to retrieve the current formatting style and add the new format to it (this will also be necessary to "toggle" formatting on/off - and save formatted text to disk) - but I cannot work out how to do this.

Does anyone know if it can be done?


Henri(Posted 2014) [#2]
Hello,

textarea has a default style which can be any of before mentioned styles, but you can not change default style without affecting any special formating. You can only use FormatTextAreaText() to apply formating to individual words/sentences afterwards.

As for saving text2disk with formating information, would be something custom made (or using html-markup, which is essentially plain text with formating information) . I'm not sure how to retrieve the style of any spesific character in textarea. Are you looking for crossplatform solution ?

-Henri


jsp(Posted 2014) [#3]
Yep, GetTextAreaTextFormat is really missing.
Also the FormatTextAreaText could have an update flag to add additional styles on top.
I remember that I wrote some code years ago for something similar and storing all formatting in an external TList to be cross platform.
Under windows only the win api may give access to those info.