@univerjs/ui v0.5.0-beta.1 • Docs
Class: BrowserClipboardService
This interface provides an interface to access system’s clipboard.
Extends
Implements
Constructors
new BrowserClipboardService()
new BrowserClipboardService(
_localeService,
_logService,
_notificationService?): BrowserClipboardService
Parameters
Parameter | Type |
---|---|
_localeService | LocaleService |
_logService | ILogService |
_notificationService ? | INotificationService |
Returns
Overrides
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:73
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
Accessors
supportClipboard
Get Signature
get supportClipboard(): boolean
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
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:69
Methods
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:106
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
read()
read(): Promise<ClipboardItem[]>
Read ClipboardItem[]
from clipboard.
Returns
Promise
<ClipboardItem
[]>
Implementation of
IClipboardInterfaceService
.read
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:114
readText()
readText(): Promise<string>
Read plain text from clipboard. Use read() to read both plain text and html.
Returns
Promise
<string
>
plain text
Implementation of
IClipboardInterfaceService
.readText
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:128
write()
write(text, html): Promise<void>
Write both plain text and html into clipboard.
Parameters
Parameter | Type |
---|---|
text | string |
html | string |
Returns
Promise
<void
>
Implementation of
IClipboardInterfaceService
.write
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:81
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
>
Implementation of
IClipboardInterfaceService
.writeText
Defined in
submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:100