displaying an image inline in TextArea.htmlText

雨燕双飞 提交于 2019-12-25 04:33:49

问题


I would like to display some smiley's inbetween text in my chatbox but when i add an image it gets displayed on a seperate line...

Any ideas?

<mx:TextArea id="myChat" width="271" height="238" backgroundColor="#ffffff" borderThickness="0" editable="false" enabled="true" horizontalScrollPolicy="off" wordWrap="true">
    <mx:htmlText>
    <![CDATA[
         <font size='14'> some text - </font><img src='images/emoticons/wink_smile.gif' height='15' width='15'/><font size='14'> more text</font>
    ]]>                      
    </mx:htmlText>
</mx:TextArea>

回答1:


Unfortunately Flash's support for the img tag in text fields is subpar; even in the official Flex 3 documentation it says:

"Note: The <img> tag is not fully supported, and might not work in some cases."

There's an issue in the Adobe bug tracker that seems to describe the exact problem you're having.

In any case, Valentin Manthei seems to have a solution for this. I haven't tried it myself, though.



来源:https://stackoverflow.com/questions/258418/displaying-an-image-inline-in-textarea-htmltext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!