[Xerte] Getting the rich text of a field

Fred Riley Fred.Riley at nottingham.ac.uk
Fri Dec 4 14:34:49 GMT 2009


Another minor query. The Xerte Help topic on getText() says:

"This function returns the rendered text in the icon, not the raw html
text."

I'm using it in an application to get text, including a few <b></b>
pairs, from a text icon and copy it to the Clipboard with:

txt = txtSummary.getText();
System.setClipboard(txt);

The text that appears on the Clipboard looks like:

<b>The start of the placement: </b>Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean
massa. Cum sociis natoque penatibus et magnis dis parturient montes,
nascetur ridiculus mus. Donec quam felis, ultricies nec, 

That was a paste into Word, using default paste setting of HTML. I
suspect it's setClipboard() that's copying the HTML tags. Is there an
option to get the *rich text* of a field to shove on the clipboard, so
that when the user copies into Word s/he'll see the rendered bold text
and not the HTML tags? I've not yet looked in the Flash Help...

As ever, this is very minor, and no big if there's no easy solution. 

Cheers

Fred

Fred Riley
Learning Technologist
School of Nursing, Midwifery and Physiotherapy, University of Nottingham
Vcard: http://www.nottingham.ac.uk/nursing/sonet/about/fr_uon.vcf 


More information about the Xerte mailing list