Skip to content

@miy2/xml-api


Class: EditorState

Represents a snapshot of the editor state at a specific point in time. Includes the source code, the logical model, and the physical CST.

Constructors

Constructor

new EditorState(config): EditorState

Parameters

config

EditorStateConfig

Returns

EditorState

Properties

cst

readonly cst: CST | null


model

readonly model: ModelElement | null


source

readonly source: string

Methods

update()

update(changes): EditorState

Creates a new state with updated properties.

Parameters

changes

Partial<EditorStateConfig>

Returns

EditorState


create()

static create(source): EditorState

Parameters

source

string

Returns

EditorState