灵活 RichText 编辑器中似乎有一个错误, 在改变观点( 查看状态变化) 时, RTE 丢失了格式。 有人以前遇到过这个问题, 并知道如何解决这个问题 。 任何帮助都会非常感激 。
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600" xmlns:base="ui.components.base.*" xmlns:ui="ui.*" xmlns:local="*">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function click_clickHandler(event:MouseEvent):void
{
trace(this.rte.htmlText);
this.currentState = "other";
}
protected function clickother_clickHandler(event:MouseEvent):void
{
this.currentState = "normal"
}
]]>
</fx:Script>
<s:states>
<s:State name="normal"/>
<s:State name="other"/>
</s:states>
<s:VGroup includeIn="normal">
<mx:RichTextEditor id="rte">
</mx:RichTextEditor>
<s:Button id="click" x = "500" y = "500" click="click_clickHandler(event)">
</s:Button>
</s:VGroup>
<s:VGroup includeIn="other" >
<s:Label>
test
</s:Label>
<s:Button id="clickother" click="clickother_clickHandler(event)">
</s:Button>
</s:VGroup>
</s:Application>