This content has been marked as final. Show 6 replies
Never mind, I've gotten it to work by changing
imageData.caption = imageNode.attributes.caption;
imageData.caption = imageNode.firstChild.firstChild;
Still trying to get the html tags to work though.
For the html tags...
imageData.caption = imageNode.firstChild.firstChild.nodeValue;
Thanks. I tried that, but the text field then completely omits the word being bolded.
Is that a real example up there.?
It looks like your CDATA is not correctly closed
<caption><![CDATA[A <b>hot</b> car makes a comeback]></caption>
<caption><![CDATA[A <b>hot</b> car makes a comeback]]></caption>
OK, I figured it out. Here's the silly key item:
You must have a dynamic text field with embedded fonts in every font you might use with the html tags!
Who would've thought. I added additional fields to my file (off the stage) with "foo" set to verdana bold, verdana italic, and verdana bold italic and embedded Basic Latin. Now it works.
Thanks for your help.
You're welcome. Yes you need to embed bold and italic versions of the fonts you're using if you have embedded fonts enabled for your textfield. (and bold-italic combined). For the XML the way I posted is also the correct way to access the CDATA node value if you have a correctly referenced imageNode.