You might want to set condenseWhite="true" on the textfield as well, it
quite often puts a stop to that kind of nonsense.
 
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of iilsley
Sent: 03 January 2008 05:19
To: [email protected]
Subject: [flexcoders] Re: embedding html in xml
 

try

<text>
<![CDATA[
This is the text with <b>html</b> tags           
]]>
</text>


--- In [email protected] <mailto:[email protected]> ,
"jamalwally" <[EMAIL PROTECTED]> wrote:
>
> Hi there,
> 
> I am using an external XML file to define the content for a Text
> component in Flex. The xml file has HTML tags (e.g. <b> for bold).
> 
> When I assign the XML to the Text component's htmlText property, I get
> unwanted extra line breaks around the HTML tags.
> 
> For example, here is the external XML file:
> 
> <text>
> This is the text with <b>html</b> tags
> </text>
> 
> Then in actionscript I load the XML file and create the Text component
> 
> // create the XML file loader
> var xmlLoader = new URLLoader();
> xmlLoader.load(new URLRequest(externalFilename));
> 
> // create an XML object from the file contents
> var myxml:XML = new XML(xmlLoader.data);
> 
> // make the Text component
> var mytext:Text = new Text();
> mytext.htmlText = myxml;
> 
> The displayed text component has three lines of text because of
> unwanted line breaks around the HTML <b> tag:
> "This is the text with
> *html*
> tags"
> 
> Instead of just one line of text as I was hoping for:
> "This is the text with *html* tags"
> 
> Is there a way around this (perhaps a way to specify a set of tags
> (e.g. <b>) that should not be interpreted as XML sub-nodes of <text>?
> 
> Thanks in advance
>
 

______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
______________________________________________________________________

Reply via email to