API Reference
@univerjs
@univerjs/core
interfaces
Iundoredoservice

@univerjs/core v0.4.2Docs


Interface: IUndoRedoService

Properties

PropertyTypeDefined in
undoRedoStatus$Observable<IUndoRedoStatus>submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:40 (opens in a new tab)

Methods

__tempBatchingUndoRedo()

__tempBatchingUndoRedo(unitId): IDisposable

Batch undo redo elements into a single IUndoRedoItem util the returned IDisposable is called.

Parameters

ParameterType
unitIdstring

Returns

IDisposable

a disposable to cancel batching undo redo elements

Deprecated

This is a temporary solution. We are going to refactor the undo redo service shortly.

Defined in

submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:60 (opens in a new tab)


clearUndoRedo()

clearUndoRedo(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:52 (opens in a new tab)


pitchTopRedoElement()

pitchTopRedoElement(): Nullable<IUndoRedoItem>

Pitch the top undo element of the currently focused Univer document instance.

Returns

Nullable<IUndoRedoItem>

Defined in

submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:47 (opens in a new tab)


pitchTopUndoElement()

pitchTopUndoElement(): Nullable<IUndoRedoItem>

Pitch the top redo element of the currently focused Univer document instance.

Returns

Nullable<IUndoRedoItem>

Defined in

submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:45 (opens in a new tab)


popRedoToUndo()

popRedoToUndo(): void

Returns

void

Defined in

submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:50 (opens in a new tab)


popUndoToRedo()

popUndoToRedo(): void

Returns

void

Defined in

submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:49 (opens in a new tab)


pushUndoRedo()

pushUndoRedo(item): void

Parameters

ParameterType
itemIUndoRedoItem

Returns

void

Defined in

submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:42 (opens in a new tab)


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