0
如果在mx TextArea上設置htmlText屬性,那麼文本屬性保持爲空,直到手動編輯TextArea。一旦htmlText屬性設置,是否有更新文本屬性的方法?TextArea htmlText在設置時不更新文本屬性(Flex)
例如
textArea.htmlText = str; 跟蹤(textArea.text)
結果=空
非常感謝, 亞當
如果在mx TextArea上設置htmlText屬性,那麼文本屬性保持爲空,直到手動編輯TextArea。一旦htmlText屬性設置,是否有更新文本屬性的方法?TextArea htmlText在設置時不更新文本屬性(Flex)
例如
textArea.htmlText = str; 跟蹤(textArea.text)
結果=空
非常感謝, 亞當
通過設置htmlText
屬性,您可以強制將即時更新的文本屬性後,呼籲textArea
validateNow()
。
例如
textArea.htmlText = str;
textArea.validateNow();
trace(textArea.text);
result = HtmlToText(str);
它是否在'htmlText'設置好幾秒後發生,例如,當html實際呈現時?如果是這樣,你可以通過使用超時得到它 – 2012-04-19 10:03:05
是的你是對的,謝謝。然而,當文本屬性更新時,沒有辦法監聽。 TextArea的「更改」事件僅由用戶更改觸發。文檔中提到,當文本屬性更新時應該觸發'textChanged'事件,但是我不能找到這樣的事件。 – mysticalOso 2012-04-19 11:15:51