Class: BrowserClipboardService
Defined in: submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:68
This interface provides an interface to access system’s clipboard.
Extends
Implements
Constructors
new BrowserClipboardService()
new BrowserClipboardService(
_localeService,
_logService,
_notificationService?): BrowserClipboardService
Defined in: submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:73
Parameters
Parameter | Type |
---|---|
_localeService | LocaleService |
_logService | ILogService |
_notificationService ? | INotificationService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
Accessors
supportClipboard
Get Signature
get supportClipboard(): boolean
Defined in: submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:69
This property tells if the platform supports reading data directly from the clipboard.
Returns
boolean
This property tells if the platform supports reading data directly from the clipboard.
Implementation of
IClipboardInterfaceService
.supportClipboard
Methods
dispose()
dispose(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
read()
read(): Promise<ClipboardItem[]>
Defined in: submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:114
Read ClipboardItem[]
from clipboard.
Returns
Promise
<ClipboardItem
[]>
Implementation of
IClipboardInterfaceService
.read
readText()
readText(): Promise<string>
Defined in: submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:128
Read plain text from clipboard. Use read() to read both plain text and html.
Returns
Promise
<string
>
plain text
Implementation of
IClipboardInterfaceService
.readText
write()
write(text, html): Promise<void>
Defined in: submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:81
Write both plain text and html into clipboard.
Parameters
Parameter | Type |
---|---|
text | string |
html | string |
Returns
Promise
<void
>
Implementation of
IClipboardInterfaceService
.write
writeText()
writeText(text): Promise<void>
Defined in: submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:100
Write plain text into clipboard. Use write() to write both plain text and html.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
Promise
<void
>