RTFText | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | field | ||||||
Summary | Specifies the contents of a field, with its text formatting represented in RTF format. | ||||||
Introduced | 2.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: field Property: HTMLText, foregroundColor, dragData Function: charToNum Glossary: format, RTF | ||||||
Description | Use the RTFText property to import and export text in RTF format. The RTFText property is a representation of the styled text of the field in RTF format. Setting the RTFText 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 RTFString. Any other formatting controls in the RTFstring are ignored. The RTFText property interprets the following RTF formatting controls: Colors:\cf, \colortbl, \red, \green, \blue, \highlight Styles:\plain, \b, \i, \ul, \ulnon, \strike, \dn, \up Font and character set: \fcharset, \ansi, \mac, \pc, \pca, \u, \fonttbl, \f, \fs Others:\header, \par, \line, \tab Getting the RTFText 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. Paragraphs with a non-empty listStyle are appropriately marked in rtfText using both the (legacy) pn family of paragraph numbering tags and also with the new listtable tags. 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. *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.
For technical information about the RTF format, see the article at [http://msdn.microsoft.com/library/en-us/dnrtfspec/html/rtfspec.asp]. | ||||||
Tags | text processing |