I am implementing my own TextAreaModel to use a mark up language I designed in the past. This allows me to use a single font and then add color and formatting based on this markup language.
I have managed to do this in TWL! The only issue is that the text formatting does not seem to be working at all. I implemented my own TextAreaModel and then made my own Style.
For example, I have done the following in my custom Style:
which, from my understanding is equivalent to the HTML model of "bold". But this has no affect on my text for my TextArea. I can color the text just fine - just the formatting doesn't seem to be working. I have also tried FONT_SIZE and FONT_ITALICS and both do not seem to work.
I've looked at the HTMLTextAreaModel code and they do not seem to do anything special for these StyleAttributes - put(attribute, value) is essentially used.
Here is the code in the custom style (simplified):
private void parseText ( String text )
//This works just fine:
//This does not work:
And here is the code in my custom TextAreaModel:
public void setText(String text)
ColorFormatStyle textStyle = new ColorFormatStyle(text);
Element element = new TextElement(textStyle, text);
public Iterator<Element> iterator ()
Thanks for any help you can give!