2 Replies Latest reply on Aug 25, 2008 1:54 PM by printing2day

    Rich Text Editor formatting problem

    printing2day
      Hello everyone,

      I need to store the htmlText attribute of the RichTextEditor as part of an XML document. Below is a code snippet I'm using to store this info (note: rte is an instance of the RichTextEditor component):

      var xml:XML = XML("<root />");
      xml.appendChild(XML(rte.htmlText));

      Unfortunately the the text gets manipulated after being converted to an XML object (specifically spaces seem to get removed). Example: " BOLD, Regular" will get changed to " BOLD,Regular". Has anyone else encountered this problem? Is there a better way I can place the htmlText attribute into an xml object?

      Many Thanks,

      TedWeb


        • 1. Re: Rich Text Editor formatting problem
          Level 7

          "printing2day" <webforumsuser@macromedia.com> wrote in message
          news:g8uu8h$o54$1@forums.macromedia.com...
          > Hello everyone,
          >
          > I need to store the htmlText attribute of the RichTextEditor as part of an
          > XML
          > document. Below is a code snippet I'm using to store this info (note: rte
          > is an
          > instance of the RichTextEditor component):
          >
          > var xml:XML = XML("<root />");
          > xml.appendChild(XML(rte.htmlText));
          >
          > Unfortunately the the text gets manipulated after being converted to an
          > XML
          > object (specifically spaces seem to get removed). Example: " BOLD,
          > Regular" will get changed to " BOLD,Regular". Has anyone else
          > encountered
          > this problem? Is there a better way I can place the htmlText attribute
          > into an
          > xml object?

          Look at the prettyIndent, PrettyPrinting, ignoreWhiteSpace properties of the
          XML class.

          HTH;

          Amy


          • 2. Re: Rich Text Editor formatting problem
            printing2day Level 1
            Thanks but I've already tried that. It's unusual because of how it's removing the spaces. Example: <B>BOLD </B> will become <B>BOLD</B>.