@univerjssheets-uiindexclassesSheetclipboardservice

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


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

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:124

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
clipboardHooks$readonlyObservable<ISheetClipboardHook[]>undefined-submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:116

Methods

addClipboardHook()

addClipboardHook(hook): IDisposable

Parameters

ParameterType
hookISheetClipboardHook

Returns

IDisposable

Implementation of

ISheetClipboardService.addClipboardHook

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:257


copy()

copy(copyType): Promise<boolean>

Parameters

ParameterTypeDefault value
copyTypeCOPY_TYPECOPY_TYPE.COPY

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.copy

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:163


copyContentCache()

copyContentCache(): CopyContentCache

Returns

CopyContentCache

Implementation of

ISheetClipboardService.copyContentCache

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:151


cut()

cut(): Promise<boolean>

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.cut

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:204


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


generateCopyContent()

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

Parameters

ParameterType
workbookIdstring
worksheetIdstring
rangeIRange

Returns

Nullable<ICopyContent>

Implementation of

ISheetClipboardService.generateCopyContent

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:155


getClipboardHooks()

getClipboardHooks(): ISheetClipboardHook[]

Returns

ISheetClipboardHook[]

Implementation of

ISheetClipboardService.getClipboardHooks

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:282


legacyPaste()

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

Parameters

ParameterType
html?string
text?string

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.legacyPaste

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:242


paste()

paste(item, pasteType): Promise<boolean>

Parameters

ParameterTypeDefault value
itemClipboardItemundefined
pasteTypestringPREDEFINED_HOOK_NAME.DEFAULT_PASTE

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.paste

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:208


removeMarkSelection()

removeMarkSelection(): void

Returns

void

Implementation of

ISheetClipboardService.removeMarkSelection

Defined in

submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:1072