Skip to main content
Known Participant
August 7, 2009
Question

How do I change lineBreak To LineBreak.EXPLICIT in a RichEditableTex?

  • August 7, 2009
  • 1 reply
  • 785 views
I am trying to change the lineBreak explicitly but the RichEditableText not allowed because hostFormat of TextFlow refers to a CSSTextLayoutFormat which is read only

Exemple

var myTextFlow:TextfLow = TextFilter.importToFlow(new XML(mySource), TextFilter.TEXT_LAYOUT_FORMAT);

<s:RichTextEditor content="{myTextFlow}" width="200" id="rt"/>

....

myTextFlow.lineBreak = LineBreak.EXPLICIT;
textFlow.flowComposer.updateAllControllers();

I tried this too, but failed

And also realized

myTextFlow.hostFormat.lineBreak = LineBreak.EXPLICIT; // i think becouse read only

and debuging above line this return that myTextFlow.hostFormat is a CSSTextLayoutFormat (is read only).

so how do I proceed? Thanks, sorry my english,

This topic has been closed for replies.

1 reply

Participating Frequently
August 7, 2009

When TLF is inside a Flex component, the hostFormat is determined by Flex's CSS style system; it's not intended to be set directly. So please try

rt.setStyle("lineBreak", "explicit");

However, I would expect

myTextFlow.lineBreak = LineBreak.EXPLICIT;

to also work. If it doesn't, please file a bug at http:/bugs.adobe.com/flex.

Gordon Smith

Adobe Flex SDK Team