<HTML dir=ltr><HEAD><TITLE>[Xerte] Getting the rich text of a field</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16939" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText54415 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>the raw text includes any markup: *&lt;b&gt;Welcome&lt;/b&gt;*,. i.e. the raw text before it is rendered.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>iconID.txt.htmlText will give you the actual text, as it appears: *Welcome*, remember the icon is a movieclip (iconID). It contains a textfield (iconID.txt). The Flash help takes over from that point, textfields do many things...</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Could you just do:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>System.setClipboard(iconID.txt.htmlText);</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Fred Riley<BR><B>Sent:</B> Fri 04/12/2009 14:34<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> [Xerte] Getting the rich text of a field<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Another minor query. The Xerte Help topic on getText() says:<BR><BR>"This function returns the rendered text in the icon, not the raw html<BR>text."<BR><BR>I'm using it in an application to get text, including a few &lt;b&gt;&lt;/b&gt;<BR>pairs, from a text icon and copy it to the Clipboard with:<BR><BR>txt = txtSummary.getText();<BR>System.setClipboard(txt);<BR><BR>The text that appears on the Clipboard looks like:<BR><BR>&lt;b&gt;The start of the placement: &lt;/b&gt;Lorem ipsum dolor sit amet,<BR>consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean<BR>massa. Cum sociis natoque penatibus et magnis dis parturient montes,<BR>nascetur ridiculus mus. Donec quam felis, ultricies nec,<BR><BR>That was a paste into Word, using default paste setting of HTML. I<BR>suspect it's setClipboard() that's copying the HTML tags. Is there an<BR>option to get the *rich text* of a field to shove on the clipboard, so<BR>that when the user copies into Word s/he'll see the rendered bold text<BR>and not the HTML tags? I've not yet looked in the Flash Help...<BR><BR>As ever, this is very minor, and no big if there's no easy solution.<BR><BR>Cheers<BR><BR>Fred<BR><BR>Fred Riley<BR>Learning Technologist<BR>School of Nursing, Midwifery and Physiotherapy, University of Nottingham<BR>Vcard: <A href="http://www.nottingham.ac.uk/nursing/sonet/about/fr_uon.vcf">http://www.nottingham.ac.uk/nursing/sonet/about/fr_uon.vcf</A><BR>_______________________________________________<BR>Xerte mailing list<BR>Xerte@lists.nottingham.ac.uk<BR><A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR></FONT></P></DIV></BODY></HTML>