Sign up (with export icon)

Batch

Api-class icon class

A batch instance groups model changes (operations). All operations grouped in a single batch can be reverted together, so you can also think about a batch as of a single undo step. If you want to extend a given undo step, you can add more changes to the batch using enqueueChange:

model.enqueueChange( batch, writer => {
	writer.insertText( 'foo', paragraph, 'end' );
} );
Copy code

Properties

  • Chevron-right icon

    baseVersion : null | number
    readonly

    Returns the base version of this batch, which is equal to the base version of the first operation in the batch. If there are no operations in the batch or neither operation has the base version set, it returns null.

  • Chevron-right icon

    isLocal : boolean
    readonly

    Whether the batch includes operations created locally (true) or operations created on other, remote editors (false).

  • Chevron-right icon

    isTyping : boolean
    readonly

    Whether the batch includes operations connected with typing.

  • Chevron-right icon

    isUndo : boolean
    readonly

    Whether the batch was created by the undo feature and undoes other operations.

  • Chevron-right icon

    isUndoable : boolean
    readonly

    Whether the batch can be undone through the undo feature.

  • Chevron-right icon

    operations : Array<Operation>
    readonly

    An array of operations that compose this batch.

Methods