<doc>
	<legacy_id>2221</legacy_id>
	<name>RTFText</name>
	<type>property</type>

	<syntax>
		<example>set the RTFText of [<i>chunk</i> of] <i>field</i> to <i>RTFString</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Specifies the contents of a <keyword tag="field">field</keyword>, with its text <glossary tag="format">formatting</glossary> represented in <glossary tag="RTF">RTF format</glossary>.</summary>

	<examples>
<example>set the RTFText of field "Stuff" to URL "file:New Stuff.rtf"</example>
<example>put the RTFText of field "Destination" into URL myURL</example>
	</examples>

	<history>
		<introduced version="2.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="4.6">4.6</changed>
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
		<field/>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Text and Data Processing</category>
	</classification>

	<references>
		<function tag="charToNum">charToNum Function</function>
		<property tag="HTMLText">HTMLText Property</property>
		<property tag="foregroundColor">foregroundColor Property</property>
		<property tag="dragData">dragData Property</property>
	</references>

	<description>
	<overview>Use the <b>RTFText</b> property to import and export text in RTF format.</overview>

		<parameters>
		</parameters>

	<value>The <b>RTFText</b> of a field is a string.</value>
	<comments>The <b>RTFText</b> property is a representation of the styled text of the field in RTF format.<p></p><p>Setting the <b>RTFText</b> of a field (or a chunk of a field) sets both the text contents and the font, size, style, and color attributes corresponding to the information in the <i>RTFString</i>. Any other formatting controls in the <i>RTFstring</i> are ignored.</p><p></p><p>The <b>RTFText</b> property interprets the following RTF formatting controls:</p><p><b>Colors</b>:  \cf, \colortbl, \red, \green, \blue, \highlight</p><p><b>Styles</b>:  \plain, \b, \i, \ul, \ulnon, \strike, \dn, \up</p><p><b>Font and character set</b>:  \fcharset, \ansi, \mac, \pc, \pca, \u, \fonttbl, \f, \fs</p><p><b>Others</b>:  \header, \par, \line, \tab</p><p></p><p>Getting the <b>RTFText</b> property reports a string consisting of the text of the field (or chunk of a field), with any font, size, style, and color properties embedded in the text in the form of RTF control words. Unicode text is supported.</p><p></p><p>Paragraphs with a non-empty <b>listStyle</b> are appropriately marked in <b>rtfText</b> using both the (legacy) pn family of paragraph numbering tags and also with the new <i>listtable</i> tags.</p><p></p><p>By using both sets of tags a reasonable degree of interoperability is achieved with both TextEdit (and other Cocoa applications) on Mac, and Word and WordPad on Windows. </p><p></p><note>Unfortunately, OpenOffice does not have particularly good rtf import / export capabilities (it doesn't even round-trip correctly through itself!) and thus copying / pasting of lists between LiveCode and OpenOffice will not work reliably or correctly.</note><p></p><important>Because the RTF standard does not include the box, threeDbox, and link styles supported by LiveCode, the <b>RTFText</b> property does not necessarily include all information necessary to reproduce the style information in a chunk. To export and re-import field information without losing any style information, use the htmlTextproperty instead.</important><p></p><p>For technical information about the RTF format, see the article at &lt;http://msdn.microsoft.com/library/en-us/dnrtfspec/html/rtfspec.asp&gt;.</p></comments>
	</description>
</doc>