Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Clipboard.SetRTFText
Puts RTF data on the clipboard.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Clipboard | 5.0 | Yes | Yes | No | No | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| RTFText | The RTF data to put in clipboard. | "{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural \f0\b\fs28 \cf0 Hello World}" |
|
| Encoding | The text encoding for text parameter. Default is Windows ANSI. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
UTF8 | Optional |
Result
Returns OK or error.
Description
Puts RTF data on the clipboard.See also Text.TextToRTF to convert formatted text to RTF.
For server this will modify the clipboard of the user account running the server app on the server computer and not the clipboard of any client.
On Windows you may want to use Text.ReplaceNewline first to convert line endings. FileMaker on Windows uses Mac line endings internally.
Examples
Put text on clipboard:
MBS( "Clipboard.SetRTFText"; "{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
\f0\b\fs28 \cf0 Hello World}"; "UTF8" )
See also
- Clipboard.GetHTMLText
- Clipboard.GetRTFText
- Clipboard.GetText
- Clipboard.SetHTMLText
- Clipboard.SetStyledText
- Clipboard.SetText
- Text.ReplaceNewline
- Text.TextToRTF
Example Databases
Created 17th November 2014, last changed 26th December 2019
Clipboard.SetPicture - Clipboard.SetStyledText
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins