You are right, if I set it to fontWeight bold then the formatting starts getting change to bold... Is this a bug or a feature? Is there any way to avoid this behaviour?
Thanks. Javier. --- In [email protected], "Daniel Freiman" <[EMAIL PROTECTED]> wrote: > > My guess is that when you add RTE as a child it is reseting the text based > on the styles. As a quick check, set the fontWeight of the RTE equal to > bold and see if the formating starts getting changed to bold instead of the > default font style. > > Daniel Freiman > nondocs <http://nondocs.blogspot.com> > > On 5/24/07, Javier de la Torre [EMAIL PROTECTED] wrote: > > > > Hi all, > > > > I am facing a problem when using the RichTextEditor in an application with > > several states. I have a richTextEditor bound to a model in a state and when > > I change to another state and get back all the changes in the formatting > > inside the richtexteditor are gone, it just suddenly changes the formatting > > back. It just change back the formatting, the text remains intact. > > Maybe it is easier just to show a simple code: > > > > -------- > > <?xml version="1.0" encoding="utf-8"?> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > > currentState="state1"> > > <mx:Model id="exampleModel"> <exampleModel> > > <ExampleText>{richTextEditorExample.htmlText}</ExampleText> > > </exampleModel> > > </mx:Model> > > <mx:states> > > <mx:State name="state1" > > > <mx:RemoveChild target="{button1}"/> > > </mx:State> > > <mx:State name="state2"> > > <mx:RemoveChild target="{richTextEditorExample}"/> > > <mx:RemoveChild target="{button2}"/> > > </mx:State> > > </mx:states> > > > > <mx:RichTextEditor id="richTextEditorExample" htmlText="{ > > exampleModel.ExampleText}" x="10" y="38"> > > </mx:RichTextEditor> > > <mx:Button x="10" y="10" label="Go to State 2" click="{currentState= > > 'state2'}" id="button2"/> > > <mx:Button x="120" y="10" label="Go to State 1" click="{currentState= > > 'state1'}" id="button1"/> > > </mx:Application> > > -------- > > When you enter the app go and add some text on the RichTextEditor, make a > > word bold, go to state 2 and the get back to state 1. The text in the editor > > is fine but the bold is gone. > > > > I have place this little code on a server for you to try: > > http://www.imastedev.com/RichTextEditorExample/testRichTextEditor.html > > > > Any idea of what could be going wrong? > > > > Thanks in advance. > > > > Javier. > > > > > > > > >

