@univerjsuiindexclassesBrowserclipboardservice

@univerjs/ui v0.5.4


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

ParameterType
_localeServiceLocaleService
_logServiceILogService
_notificationService?INotificationService

Returns

BrowserClipboardService

Overrides

Disposable.constructor

Properties

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

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


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

ParameterType
textstring
htmlstring

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

ParameterType
textstring

Returns

Promise<void>

Implementation of

IClipboardInterfaceService.writeText