How to get HTML text from Adobe Flex Builder RichTextEditor?

How to get HTML text from entered and edited text in Adobe Flex Builder RichTextEditor control ? I mean with valid HTML coming from the Flex RichTextEditor component

Not badly formed HTML, without spaces, with tags not closed!

So, we have text edited with RTE a-la alt text http://livedocs.adobe.com/flex/3/html/images/RTE1.png

We want to get its contents as HTML. how to do it?

+3
source share
2 answers

RteHtmlParser, RTE "html" html . , . : http://blog.flashweb.org/archives/7

+3

? 3.2, HTML.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:HBox width="100%" height="100%">
    <mx:RichTextEditor id="rte" />
    <mx:TextArea height="{rte.height}" width="{rte.width}" text="{rte.htmlText}" />
</mx:HBox>  
</mx:Application>

Flex 3.2 , , :

<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="Verdana" SIZE="12" COLOR="#009900" LETTERSPACING="0" KERNING="1"><B>This is the way the world ends</B></FONT></P></TEXTFORMAT>

:

<P text-align:CENTER;><span style="font-family:Verdana; font-size:12px; color:#009900;  "><strong>This is the way the world ends</strong></span>

( , " ", .)

EDIT:

, , :

pattern = /<\/P>/g;
str = str.replace(pattern, "");

, </p>.

, , , . htmlText, RichTextEditor, , .

+1

Source: https://habr.com/ru/post/1730565/


All Articles