API Reference
@univerjs
@univerjs/sheets-ui
classes
Sheetclipboardservice

@univerjs/sheets-ui v0.4.2Docs


Class: SheetClipboardService

Extends

Implements

Constructors

new SheetClipboardService()

new SheetClipboardService(
   _logService, 
   _univerInstanceService, 
   _selectionManagerService, 
   _clipboardInterfaceService, 
   _undoRedoService, 
   _commandService, 
   _markSelectionService, 
   _notificationService, 
   _platformService, 
   _renderManagerService, 
   _themeService, 
   _localeService, 
   _errorService, 
   _injector): SheetClipboardService

Parameters

ParameterType
_logServiceILogService
_univerInstanceServiceIUniverInstanceService
_selectionManagerServiceSheetsSelectionsService
_clipboardInterfaceServiceIClipboardInterfaceService
_undoRedoServiceIUndoRedoService
_commandServiceICommandService
_markSelectionServiceIMarkSelectionService
_notificationServiceINotificationService
_platformServiceIPlatformService
_renderManagerServiceIRenderManagerService
_themeServiceThemeService
_localeServiceLocaleService
_errorServiceErrorService
_injectorInjector

Returns

SheetClipboardService

Overrides

Disposable.constructor

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:124 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
clipboardHooks$readonlyObservable<ISheetClipboardHook[]>undefined-packages/sheets-ui/src/services/clipboard/clipboard.service.ts:116 (opens in a new tab)

Methods

addClipboardHook()

addClipboardHook(hook): IDisposable

Parameters

ParameterType
hookISheetClipboardHook

Returns

IDisposable

Implementation of

ISheetClipboardService.addClipboardHook

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:257 (opens in a new tab)


copy()

copy(copyType): Promise<boolean>

Parameters

ParameterTypeDefault value
copyTypeCOPY_TYPECOPY_TYPE.COPY

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.copy

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:163 (opens in a new tab)


copyContentCache()

copyContentCache(): CopyContentCache

Returns

CopyContentCache

Implementation of

ISheetClipboardService.copyContentCache

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:151 (opens in a new tab)


cut()

cut(): Promise<boolean>

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.cut

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:204 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


generateCopyContent()

generateCopyContent(
   workbookId, 
   worksheetId, 
range): Nullable<ICopyContent>

Parameters

ParameterType
workbookIdstring
worksheetIdstring
rangeIRange

Returns

Nullable<ICopyContent>

Implementation of

ISheetClipboardService.generateCopyContent

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:155 (opens in a new tab)


getClipboardHooks()

getClipboardHooks(): ISheetClipboardHook[]

Returns

ISheetClipboardHook[]

Implementation of

ISheetClipboardService.getClipboardHooks

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:282 (opens in a new tab)


legacyPaste()

legacyPaste(html?, text?): Promise<boolean>

Parameters

ParameterType
html?string
text?string

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.legacyPaste

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:242 (opens in a new tab)


paste()

paste(item, pasteType): Promise<boolean>

Parameters

ParameterTypeDefault value
itemClipboardItemundefined
pasteTypestringPREDEFINED_HOOK_NAME.DEFAULT_PASTE

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.paste

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:208 (opens in a new tab)


removeMarkSelection()

removeMarkSelection(): void

Returns

void

Implementation of

ISheetClipboardService.removeMarkSelection

Defined in

packages/sheets-ui/src/services/clipboard/clipboard.service.ts:1072 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.