clipboardData | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Specifies what data and of what type is on the clipboard. | ||||||
Introduced | 2.0 | ||||||
OS | mac, windows, linux | ||||||
Platforms | desktop | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Property: dragData, fullClipboardData, rawClipboardData, text Command: copy, paste, lock clipboard, unlock clipboard Function: clipboard Glossary: clipboard | ||||||
Description | Use the clipboardData property to put data in the clipboard in a specified format, or to get the contents of the clipboard, without copying or pasting. The keys for the clipboardData are the following:
The clipboardData property is populated automatically when the clipboard content is changed, either by using the cut or copy command, or by cutting or copying in another application. If the clipboard contains data compatible with the
specified type, it is converted to the requested type; otherwise the
array element for that type is empty. For example, if the
clipboard contains text "hello", You can query the keys of the clipboardData to determine what types of data are on the clipboard. For example, if the clipboard contains styled text, you can put that text (in htmlText format) in a variable with the following statement:
To change the contents of the clipboard, you can set the clipboardData property directly. For example, the following statement places the text "Hello World" on the clipboard:
The above statement will only place plain text on the clipboard, similar to using the copy command from a text only editor.
The above statement is equivalent to selecting the text "Hello World" in a field and choosing Copy Text from the Edit menu, or to using the copy command (chunk of field syntax) since styled text is placed on the clipboard by default. The data you place on the clipboard is accessible to your application using the paste command, and to other applications (that support pasting text) using the application's Paste menu item.
| ||||||
Tags | ui,clipboard |