Clipboard

expect object Clipboard
actual object Clipboard

TODO Not implemented. Reading the HTML DOM api, I don't know if it is possible to monitor the clipboard so that we can spot when the clipboard does/doesn't contains text. So I don't know if it is possible to implement containsTextProperty (cleanly).

Also I don't know how to implement textContents (cleanly), as the JS API uses promises, whereas this API (which was designed for the jvm) assumes that the clipboard can be read immediately (not via a Promise).

So, at the moment, containsTextProperty is always false, and the only operation that works is setting textContents.

A dirty solution, would periodically check the clipboard, update containsTextProperty and cache the text (if there is any). This would be far from ideal.

actual object Clipboard : ClipboardOwner

Exposes the system clipboard for copy/paste operations.

Currently only text is supported.

Get/set the contents of text using textContents.

Properties

Link copied to clipboard
expect var containsText: Boolean
actual var containsText: Boolean
actual var containsText: Boolean
Link copied to clipboard

Does the clipboard currently contain text.

Does the clipboard currently contain text.

Does the clipboard currently contain text.

Link copied to clipboard

The opposite of containsTextProperty. Use this as the disabledProperty for paste actions.

The opposite of containsTextProperty. Use this as the disabledProperty for paste actions.

The opposite of containsTextProperty. Use this as the disabledProperty for paste actions.

Link copied to clipboard
expect var textContents: String?
actual var textContents: String?
actual var textContents: String?

Functions

Link copied to clipboard
open override fun lostOwnership(p0: Clipboard?, p1: Transferable?)