Fwio

CodeMirror Notes

1 min

Reference

Structure

Core

EditorState

Internal state of the editor

EditorView

DOM states of the editor

Lifecycle

EditorState -> EditorView -> DOM -> Events -> Transaction -> EditorState …

Primitives

Facet

Extension point

StateField

Stateful data

StateEffect

Side effects contributing to the StateField

Decoration

Manipulate the DOM of a range of content in harmony with the EditorView

ViewPlugin

Draw additional content in the editor in a way that isn’t tied to a specific range.

Two way to create a ViewPlugin:

Transaction