@univerjscoreinterfacesIundoredoservice

@univerjs/core v0.5.4


Interface: IUndoRedoService

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:39

Properties

PropertyTypeDefined in
undoRedoStatus$Observable<IUndoRedoStatus>packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:40

Methods

__tempBatchingUndoRedo()

__tempBatchingUndoRedo(unitId): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:60

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.


clearUndoRedo()

clearUndoRedo(unitId): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:52

Parameters

ParameterType
unitIdstring

Returns

void


pitchTopRedoElement()

pitchTopRedoElement(): Nullable<IUndoRedoItem>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:47

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

Returns

Nullable<IUndoRedoItem>


pitchTopUndoElement()

pitchTopUndoElement(): Nullable<IUndoRedoItem>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:45

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

Returns

Nullable<IUndoRedoItem>


popRedoToUndo()

popRedoToUndo(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:50

Returns

void


popUndoToRedo()

popUndoToRedo(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:49

Returns

void


pushUndoRedo()

pushUndoRedo(item): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:42

Parameters

ParameterType
itemIUndoRedoItem

Returns

void