Here's my theory of what's happening, if I understand you correctly:

1. The user update text.
2. Change Event is thrown.
3. Model is updated.
4. htmlText is bound to model so the model updates htmlText (this is the
step where I'm not sure if I understand you correctly).
5. RTE properties are invalidated by previous step and in commitProperties()
(speicfically line 308), the defaultTextFormat is changed back to whatever
the CSS of the RTE is set to.
6. Typing another character takes on the default style of the RTE.

A good way to test this theory is to call rte.setStyle("color", "red") and
see if this makes the incorrectly formated text red.

As for a good workaround, I'll have to think about it.  Overriding
commitProperties() would probably be the easiest thing (but for some reason
a voice in the back of my head is telling me you can't extend mxml
components.  I'm not sure I really believe it.  I never user mxml so I maybe
I'm just a little crazy.).

- Dan Freiman

On Jan 29, 2008 10:20 AM, Daniel Freiman <[EMAIL PROTECTED]> wrote:

> Cort is right that earlier versions worked as he described, but that's not
> what's going on here.  Earlier versions had issues with the way flash
> natively handled textfields, which has since been fixed.  This issue sounds
> like it has something to do with defaultTextFormat being reset.
>
> - Dan Freiman
>
>
> On Jan 29, 2008 9:00 AM, Cortlandt Winters <[EMAIL PROTECTED]> wrote:
>
> >   Hi Guys,
> >
> > I know it sounds nutty, but what I had to do in order to overcome this
> > problem for an earlier version of the flash player that also worked this way
> > is explicitly get the style properties of the previous character and apply
> > it to the current character right after typing it (unless the toggle buttons
> > for bold and italic and the like or the combobox for size was different in
> > which case it was treated as an override)
> >
> > -Cort
> >
> >
> > On Jan 29, 2008 8:48 AM, YOGESH JADHAV <[EMAIL PROTECTED]> wrote:
> >
> > >   I think yahoo's web messenger is using flex's RTE & it is working.
> > > Hope anybody from that team  is seeing this thread.
> > >
> > >
> > > On Jan 29, 2008 11:02 AM, Sherif Abdou <[EMAIL PROTECTED]> wrote:
> > >
> > > >   prob means will be in Flex 4 and not flex 3
> > > >
> > > > ----- Original Message ----
> > > > From: YOGESH JADHAV <[EMAIL PROTECTED]>
> > > > To: [email protected]
> > > > Sent: Monday, January 28, 2008 11:26:34 PM
> > > > Subject: Re: [flexcoders] RichTextEditor - format preservation
> > > >
> > > >  Sorry my english ( or  jargon about software testing ) is not that
> > > > good. When  I googled  i got this
> > > > *
> > > > Deferred*: If the *bug* is not related to current build or can not
> > > > be fixed in this release or *bug* is not important to fix
> > > > immediately
> > > >
> > > > What does it exactly mean in this context?  Is that the intented
> > > > behaviour to lose style ? Or they dont wanna fix it ?
> > > >
> > > > On Jan 29, 2008 1:14 AM, Richard Rodseth <[EMAIL PROTECTED] com<[EMAIL 
> > > > PROTECTED]>>
> > > > wrote:
> > > >
> > > > >   I see the bug was deferred without comment. If anyone has a
> > > > > workaround, I'd appreciate it.
> > > > >
> > > > >
> > > > > On Jan 24, 2008 8:30 AM, Richard Rodseth <[EMAIL PROTECTED] 
> > > > > com<rrodseth%40gmail.com>>
> > > > > wrote:
> > > > > > Since I don't yet have a workaround for this issue, I wrote up a
> > > > > bug,
> > > > > > in case something can be done:
> > > > > >
> > > > > > http://bugs. adobe.com/ jira/browse/ 
> > > > > > SDK-14438<http://bugs.adobe.com/jira/browse/SDK-14438>
> > > > > >
> > > > > > On Jan 9, 2008 12:27 AM, YOGESH JADHAV <[EMAIL PROTECTED] 
> > > > > > com<yjadhav%40gmail.com>>
> > > > > wrote:
> > > > > >
> > > > > > > I have posted same issue few weeks ago.
> > > > > >
> > > > > > > If anybody knows the solution please reply.
> > > > > > > I am also interested in adding support for smiley/emoticons in
> > > > > RTE. I have
> > > > > > > found some workarounds on net but still think that there
> > > > > should be inbuilt
> > > > > > > support for that.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Jan 9, 2008 12:57 AM, Richard Rodseth <[EMAIL PROTECTED] 
> > > > > > > com<rrodseth%40gmail.com>>
> > > > > wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > I have a RichTextEditor with htmlText bound to a property in
> > > > > a model. I
> > > > > > > update the model property on change events.
> > > > > > > >
> > > > > > > >
> > > > > > > > The problem is that if I type to replace text, the
> > > > > formatting is not
> > > > > > > preserved. i.e. set font to 48, start typing, and the first
> > > > > character is in
> > > > > > > 48, the next one isn't. Or if I have 48 point text selected
> > > > > and type to
> > > > > > > replace, the new text is not in 48pt.
> > > > > > > >
> > > > > > > >
> > > > > > > > Any ideas?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > There is no point in knocking the "closed Windows" when the
> > > > > door is "Open".
> > > > > > > Open your eyes, use open source software.
> > > > > > >
> > > > > > >
> > > > > > > Regards,
> > > > > > > Yogesh
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > >
> > > > Regards,
> > > > Yogesh
> > > >
> > > >
> > > > ------------------------------
> > > > Never miss a thing. Make Yahoo your 
> > > > homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
> > > >
> > >
> > >
> > >
> > > --
> > >
> > >
> > > Regards,
> > > Yogesh
> > >
> >
> >  
> >
>
>

Reply via email to