2010-01-29 41 views
0

如何添加圖像到Adobe Flex RichTextEditor control?我的意思是使用按鈕 =)如何將圖像添加到Adobe Flex RichTextEditor?

所以我們有一些RTE文本編輯器一拉 editor screenshot http://livedocs.adobe.com/flex/3/html/images/RTE1.png

我們要使用一些按鈕,進入其內容的圖像。如何做這樣的事情?

BTW:我發現這個http://anotherflava.com/2009/01/12/flex-xhtml-rich-text-editor-w-images/但我真的不知道如何使它發揮作用,所以如果任何一個可以用簡單的發佈簡單的項目(髒OK)來源這將是爐排)))

回答

1

RichTextEditor!是一個複雜的組件,由幾個小組件組成,並且TextArea。所以問題是如何在TextArea中插入圖像。

TextArea可以呈現簡單的HTML,並支持<img>標記。關於htmlText屬性的更多信息here

所以

var myTextEditor:RichTextEditor = new RichTextEditor(); 
myTextEditor.htmlText = "<img src='myImage.jpg' />"