3 Replies Latest reply on Jul 3, 2007 2:42 PM by nicetim


      I cannot get the richtexteditor to format text correctly, it sizes the font way to big. I fanybody has messed around with this please let me know, thank you.
        • 1. Re: RichTextEditor
          The Flex Rich Text Editor is only meant to format text which you will later use in a Flex App. In other words, it creates "Flex" HTML and if you try to use this anywhere else, the formatting is way, way off.

          Hope that helps. The only real solutions is to find a good Flash WYSIWYG editor out there (have yet to find one) or use an IFrame and use something like TinyMCE.
          • 2. Re: RichTextEditor
            ckshah Level 1

            i have faced same prob in my app when i am display data in popupwindow which r alrady store using rich editor avaliable in flex
            for that prob u have to use this custom code

            var tmpStr:String = mailContentRE.textArea.htmlText;
            var tempcntr:Number=tmpStr.indexOf("SIZE=");
            var lastIn:Number = tmpStr.lastIndexOf("SIZE=");
            var t:String;
            var tr:String;
            var a:Number;
            var b:Number;

            for(var i:Number=tempcntr;i<=lastIn;i++){

            t = (tmpStr.substring(i-1,i+9));
            t = t.substring(0,t.length-1);
            tr = t
            t = t.replace('"', "")
            t = t.replace('"', "")
            a = Number(t.substr(t.indexOf('=')+1,t.length))
            b = Number(t.substr(t.indexOf('=')+1,t.length))
            b = b-8
            t = t.replace(a,b);
            t = t + "px";
            tmpStr = tmpStr.replace(tr,t);

            i = tmpStr.indexOf("SIZE=",i)

            mailParams.content = tmpStr

            //mailParams is object

            try this i think it may help u lot

            • 3. Re: RichTextEditor
              nicetim Level 1
              you basically have to strip out (before displaying in HTML) the <font size="X" and replace with <font style="font-style:X;"