3 Replies Latest reply on Nov 26, 2008 9:08 AM by rtalton

    Problem with htmlText

    mchtower
      I'm having a problem displaying htmlText properly in Text and TextArea controls.

      My application has a Rich Text Editor control which allows users to enter text and save it to a MySQL database via PHP. No modifications are made to the text before saving it in the database. When the saved text is retrieved from the database and displayed in the Rich Text Editor control the text is displayed exactly how it was entered. However if I retrieve the text from the database and display it using a Text or TextArea control the first line is always indented even though the text is not entered with any indentations and there are no indentations when the text is displayed in the Rich Text Editor control.

      Anyone have an idea what could be causing this?
        • 1. Re: Problem with htmlText
          Level 7

          "MCH21" <webforumsuser@macromedia.com> wrote in message
          news:ggjruj$uv$1@forums.macromedia.com...
          > I'm having a problem displaying htmlText properly in Text and TextArea
          > controls.
          >
          > My application has a Rich Text Editor control which allows users to enter
          > text
          > and save it to a MySQL database via PHP. No modifications are made to the
          > text
          > before saving it in the database. When the saved text is retrieved from
          > the
          > database and displayed in the Rich Text Editor control the text is
          > displayed
          > exactly how it was entered. However if I retrieve the text from the
          > database
          > and display it using a Text or TextArea control the first line is always
          > indented even though the text is not entered with any indentations and
          > there
          > are no indentations when the text is displayed in the Rich Text Editor
          > control.
          >
          > Anyone have an idea what could be causing this?

          Try setting prettyPrinting and prettyIndent on the XML object to false.

          HTH;

          Amy


          • 2. Re: Problem with htmlText
            rtalton Level 4
            You'd have to debug it and look at what your PHP code is returning.
            It may be an interaction between your db and the PHP code.
            • 3. Re: Problem with htmlText
              rtalton Level 4
              FYI: The prettyIndent setting (an integer) can simply be ignored if you set prettyPrinting to false.