Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Clipboard.SetStyledText

Put styled text on the clipboard.

Component Version macOS Windows Linux Server iOS SDK
Clipboard 5.0 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "Clipboard.SetStyledText"; Text )   More

Parameters

Parameter Description Example
Text The styled text to put in clipboard. "Hello World"

Result

Returns OK or error.

Description

Put styled text on the clipboard.

This is direct way for styled text without converting in-between to RTF.
For Windows or cross platform solutions you can combine Text.TextToRTF and Clipboard.SetRTFText.

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.

Implemented for Windows with version 11.3 of MBS Plugin.

Examples

Put red text on the clipboard:

MBS( "Clipboard.SetStyledText"; TextColor ( "Hello World" ; RGB ( 65535 ; 0 ; 0 ) ) )

See also

Release notes

  • Version 14.5
    • Improved styled text conversion on macOS to include better support for highlight, underline and strikethrough, e.g. for RichText.SetFormattedText and Clipboard.SetStyledText functions.
  • Version 11.3

Example Databases

Blog Entries

This function checks for a license.

Created 17th November 2014, last changed 19th May 2021


Clipboard.SetRTFText - Clipboard.SetText