@univerjs/ui v0.5.0-beta.1 • Docs
Interface: IClipboardInterfaceService
This interface provides an interface to access system’s clipboard.
Properties
Property | Modifier | Type | Description | Defined in |
---|---|---|---|---|
supportClipboard | readonly | boolean | This property tells if the platform supports reading data directly from the clipboard. | submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:61 |
Methods
read()
read(): Promise<ClipboardItem[]>
Read ClipboardItem[]
from clipboard.
Returns
Promise
<ClipboardItem
[]>
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:56
readText()
readText(): Promise<string>
Read plain text from clipboard. Use read() to read both plain text and html.
Returns
Promise
<string
>
plain text
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:51
write()
write(text, html): Promise<void>
Write both plain text and html into clipboard.
Parameters
Parameter | Type |
---|---|
text | string |
html | string |
Returns
Promise
<void
>
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:45
writeText()
writeText(text): Promise<void>
Write plain text into clipboard. Use write() to write both plain text and html.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
Promise
<void
>
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:38