5 Replies Latest reply on Apr 3, 2009 7:15 AM by emerys


    Level 1
      Has anyone else noticed that you cannot set a RichTextEditor control to Read-Only? TextInput and TextArea controls have this property, but not the RTE control. It looks like you can only disable the RTE, but then you can't scroll.
      The reason I would like to have this is an application that I'm working on; if the user who originally entered a comment logs on, they should be able to edit their comment; all others should only be allowed to read. I like the RTE control, because you can set the font size, etc. (It's not quite as good as the ColdFusion RTE, but it'll do).
      Is there a way to switch the control from RTE to TextArea? But I'm not sure if that will work, because, even when I use HtmlText, the comment doesn't display the same as it does in the RTE.
      Can we submit this as a suggestion for Gumbo (Flex4)?
      If someone has a better way of doing this, please tell me.
        • 1. Re: RichTextEditor
          The TextArea component of a RTE is accessible. You could set the TextArea non-editible:

          rte.textArea.editable = false;

          <mx:RichTextEditor id="rte" />
          • 2. Re: RichTextEditor
            Level 1
            Which version of Flex Builder are you using?
            I've got 3.0.194161, and it shows the textArea.Editable property as being an error. And it doesn't compile of course.

            • 3. Re: RichTextEditor
              Gregory Lafrance Level 6
              I have 3.0.214193 and the following works:
              • 4. Re: RichTextEditor
                Level 1
                That's the fix.
                I upgraded my Flex Builder to the same version and now the TextArea.Editable property works.

                There should be a better system for telling us when an upgrade is available. Maybe one of the catagories on the forum.
                • 5. Re: RichTextEditor
                  Level 1
                  Actually the rte editable sort of worked.
                  But it was because I was using a TabNavigator with one rte on each tab. I have eight rtes, and only the first one would work for setting the editable property - the others would just fail. It took a lot of searching to find that only the first tab really exists before the user clicks on it. (This also applies to accordians or other viewStack controls)
                  You need to use creationPolicy="all" to make it instantiate all the other tabs before you can progamatically set anything on them.