Skip to content

ChangeSet

Unofficial

Import:

import type { ChangeSet } from '@codemirror/state';

Signature:

export interface ChangeSet

Methods

MethodReturnsDescription
apply(doc)TextApply the changes to a document, returning the modified document.
compose(other)ChangeSetCombine two subsequent change sets into a single set.
invert(doc)ChangeSetGiven the document as it existed before the changes, return a change set that represents the inverse of this set.
iterChanges(f, individual?)voidIterate over the changed ranges in the document.
map(other, before?)ChangeSetGiven another change set starting in the same document, maps this change set over the other.
mapDesc(other, before?)ChangeDescMap this description over another set of changes.
toJSON()unknownSerialize this change set to a JSON-representable value.

Links to this page: