@univerjsuiindexclassesBrowserclipboardservice

@univerjs/ui v0.5.0-beta.1Docs


Class: BrowserClipboardService

This interface provides an interface to access system’s clipboard.

Extends

Implements

Constructors

new BrowserClipboardService()

new BrowserClipboardService(
   _localeService, 
   _logService, 
   _notificationService?): BrowserClipboardService

Parameters

ParameterType
_localeServiceLocaleService
_logServiceILogService
_notificationService?INotificationService

Returns

BrowserClipboardService

Overrides

Disposable.constructor

Defined in

submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:73

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/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

Disposable.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

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

ParameterType
textstring
htmlstring

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

ParameterType
textstring

Returns

Promise<void>

Implementation of

IClipboardInterfaceService.writeText

Defined in

submodules/univer/packages/ui/src/services/clipboard/clipboard-interface.service.ts:100