3 Replies Latest reply on Aug 13, 2009 9:07 PM by Gregory Lafrance

    Rich Tex Editor indent and outdent functions

    Hessian0

      Hello

       

      I tried in many ways to create a working indent and oudent function for the richtexteditor (htmlText), but dont want to work.

      I can't find nothing usefull on forums for this problem.

      Have you any ideas? Maybe someone of you wrote something like that before.

       

      Thanks

        • 1. Re: Rich Tex Editor indent and outdent functions
          Gregory Lafrance Level 6

          You are trying to create functions to indent text like this:

           

              This is where my text starts, and this is the first sentence, and it is a simple example of indenting text by four characters, just in order to illustrate what I think the poster means by creating indent and outdent functions.

          • 2. Re: Rich Tex Editor indent and outdent functions
            Hessian0 Level 1

            Hi Greg

             

            No.. just look at reply post page of this forum. In the texteditor toolbar you can see "oudent" and "indent" buttons.

            Thats what i mean.

            I think the only way to do that is working around htmlText  <TEXTFORMAT> that include INDENT,BLOCKINDENT and LEFTMARGIN properties.

             

            Here the livedocs reference:

            http://livedocs.adobe.com/flex/3/langref/flash/text/TextFormat.html

             

             

            Sorry for my poor english. I do my best

             

            Hessian

            • 3. Re: Rich Tex Editor indent and outdent functions
              Gregory Lafrance Level 6

              You seem to be able to use this for indent:        txt.textArea.setStyle("paddingLeft", 50);

               

              If this post answers your question or helps, please mark it as such.

               

              <?xml version="1.0" encoding="utf-8"?>
              <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                creationComplete="init();">
                <mx:Script>
                  <![CDATA[
                    private function init():void{
                      txt.textArea.setStyle("paddingLeft", 50);
                      txt.validateNow();
                    }
                  ]]>
                </mx:Script>
                <mx:RichTextEditor id="txt" width="500" height="350" 
                  text="The RichTextEditor has a default height and width of 300 by 325 pixels and a default minimum height and width of 200 by 220 pixels. If you put a RichTextEditor control in a DividedBox control, make sure that the DividedBox control is large enough to contain the RichTextEditor control at its minimum dimensions. Also, you can explicitly set the RichTextEditor control's minHeight or minWidth property to NaN to let the DividedBox container reduce the control's dimensions to 0."/>
              </mx:Application>