0

flexのRichTextEditorには、ビューの変更(ビューの状態の変更)時に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>
4

1 に答える 1

1

私はその問題に直面しており、解決策は外部スタイルを適用しています。

ビューが変更されたときにそのcssをrteに適用することを意味します。

良い1日を....

于 2012-05-25T13:30:18.207 に答える