Skip to content

Cm5EditorChangeCancellable

Unofficial

A cancellable editor change object in CodeMirror 5.

Import:

import type { Cm5EditorChangeCancellable } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface Cm5EditorChangeCancellable extends Cm5EditorChange

Extends: Cm5EditorChange

Properties

PropertyTypeDescription
fromPositionThe start position of the change.
(Inherited from Cm5EditorChange)
origin?stringThe origin of the change.
(Inherited from Cm5EditorChange)
removed?string[]The text that was removed by the change.
(Inherited from Cm5EditorChange)
textstring[]The new text that was inserted.
(Inherited from Cm5EditorChange)
toPositionThe end position of the change.
(Inherited from Cm5EditorChange)

Methods

MethodReturnsDescription
cancel()voidCancels the change.
update(from?, to?, text?)voidModifies the change. All arguments are optional.