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

Property Type Description
from Position The start position of the change.
(Inherited from Cm5EditorChange)
origin? string The origin of the change.
(Inherited from Cm5EditorChange)
removed? string[] The text that was removed by the change.
(Inherited from Cm5EditorChange)
text string[] The new text that was inserted.
(Inherited from Cm5EditorChange)
to Position The end position of the change.
(Inherited from Cm5EditorChange)

Methods

Method Returns Description
cancel() void Cancels the change.
update(from?, to?, text?) void Modifies the change. All arguments are optional.