You can try treating your HTML as XHTML (make sure it's well-formed),
then adjust the rendering properties with a toXMLString().
 
Noted properties are: XML.ignoreWhitespace, XML.prettyPrinting, and
TextArea.condenseWhite
 
  <mx:Script>
    <![CDATA[
      
      [Bindable]
      private var _htmlText:XML;
      
      private function init():void
      {
        XML.ignoreWhitespace = true;
        XML.prettyPrinting = false;
        _htmlText = <p><img border="0" alt="" style="width: 76px;
height: 91px;" src="http://serverpath/files/i1.jpg"; /><span
style="font-weight: bold;">KB <br />Hi how are you<br /><img border="0"
alt="" style="width: 78px; height: 78px;"
src="http://serverpath/files/i2.jpg"; /> Nimo <br />pls feel free to join
us<br /></span></p>;
      }
    ]]>
  </mx:Script>
  <mx:VBox id="v1" width="600" height="800">
    <mx:TextArea condenseWhite="true"
htmlText="{_htmlText.toXMLString()}" width="500" height="400"/>
  </mx:VBox> 
 
HTH,
Ryan

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of abhishekchess1
Sent: Thursday, September 25, 2008 9:35 PM
To: [email protected]
Subject: [flexcoders] html in flex



hello frnds,
i'm using html in flex , in my html code i'm showing first 1 image
then its details then at next line
anather image and its details , but when i'm doing this , it shows
first image then text of its beside it and next line but beside first
img 2nd image's details also and then it showing 2nd image.
so could u tell how can i show it in proper format like in html.

my code is
<mx:VBox id="v1" width="600" height="800">

<mx:TextArea htmlText="<img border="0" alt="" style="width:
76px; height: 91px;" src="http://serverpath/files/i1.jpg
<http://serverpath/files/i1.jpg> " /><span
style="font-weight: bold;">KB <br />Hi how are you<br /><img
border="0" alt="" style="width: 78px; height: 78px;" src="http://
serverpath/files/i2.jpg" /> Nimo <br />pls feel free to join us<br /></
span>">

</mx:VBox> 

[EMAIL PROTECTED] <mailto:abhishekchess1%40gmail.com> 



 


This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.

Reply via email to