Utility functions for working with the system clipboard. On platforms that don't support interacting with the clipboard, an internal clipboard is used (neat!).
Static methods
staticaddListener(callback:() ‑> Void, once:Bool = false, priority:Int = 0):Void
Add an event listener callback which executes next time the system clipboard is updated.
Parameters:
callback | The callback to execute when the clipboard is updated. |
|---|---|
once | If true, the callback will only execute once and then be deleted. |
priority | Set the priority at which the callback will be executed. Higher values execute first. |
staticgetClipboard():String
Get the current contents of the system clipboard.
Returns:
The current contents of the system clipboard.
staticremoveListener(callback:() ‑> Void):Void
Remove an event listener callback from the system clipboard.
Parameters:
callback | The callback to remove. |
|---|
staticsetClipboard(text:String):String
Set the contents of the system clipboard.
Parameters:
text | The text to set the system clipboard to. |
|---|