Package-level declarations
Types
Annotations are tagged values that are used to add metadata to transactions in an extensible way.
Marker that identifies a type of Annotation.
A change description is a variant of ChangeSet that doesn't store the inserted text. As such, it can't be applied, but is cheaper to store and manipulate.
A change set represents a group of modifications to a document. It stores the document length, and can only be applied to documents with exactly that length.
This type is used as argument to EditorState.changes and in the changes field of transaction specs to succinctly describe document changes.
The categories produced by a character categorizer. These are used to do things like selecting by word.
Extension compartments can be used to make a configuration dynamic.
An editor selection holds one or more selection ranges.
Serializable representation of an EditorSelection.
The editor state class is a persistent (immutable) data structure. To update a state, you create a Transaction, which produces a new state instance.
Builder scope for constructing an EditorState via DSL.
Options passed when creating an editor state.
Serializable representation of an EditorState.
Marks DSL scope for EditorStateBuilder to prevent accidental scope leaking.
Builder scope for assembling a list of extensions using unary +.
A facet is a labeled value that is associated with an editor state. It takes inputs from any number of extensions, and combines those into a single output value.
A facet reader can be used to fetch the value of a facet.
Describes how a StateField's value is serialized to/from JSON.
A type-safe entry pairing a LanguageDataKey with its value.
A type-safe key for language data fields.
A type-safe wrapper around language data maps.
A 1-based line number in a document.
A range associates a value with a range of positions.
Collection of methods used when comparing range sets.
A range cursor is an object that moves to the next range every time you call next on it.
Each range is associated with a value, which must inherit from this class.
A single selection range. When allowMultipleSelections is enabled, a selection may hold multiple ranges. By default, selections hold exactly one range.
Serializable representation of a SelectionRange.
A handle grouping a StateField with associated StateEffectTypes for a set-based pattern.
Methods used when iterating over the spans created by a set of ranges.
Subtype of Command that doesn't require access to the actual editor view.
State effects can be used to represent additional effects associated with a transaction.
Representation of a type of state effect.
Fields can store additional information in an editor state, and keep it in sync with the rest of the state.
Builder scope for defining a StateField via DSL.
Marks DSL scope for StateFieldBuilder to prevent accidental scope leaking.
A text iterator iterates over a sequence of strings. When iterating over a Text document, result values will either be lines or line breaks.
A handle grouping a StateField with its associated StateEffectTypes for a boolean toggle pattern.
Result type for ChangeDesc.touchesRange.
Changes to the editor state are grouped into transactions.
Marks DSL scope for TransactionSpecBuilder to prevent accidental scope leaking.
Result type for transaction extender facet.
Describes a Transaction when calling EditorState.update.
Builder scope for constructing a TransactionSpec via DSL.
Properties
Facet that controls whether the editor allows multiple selections. When any provider supplies true, multiple selections are enabled.
Facet that registers change filters. Each filter is called with a transaction and can accept, reject, or restrict the ranges affected by the change.
Facet that registers inverted effect providers. Each provider maps a transaction to a list of effects that should be applied when the transaction is undone, enabling custom undo/redo behavior for state effects.
Facet that registers language data providers. Each provider receives the editor state, a position, and a side hint, and returns a list of property maps describing language-specific data (e.g. autocomplete, indentation rules) at that position.
Facet that configures the line separator used by the editor. When not provided, the editor auto-detects the separator from the document content. Only the first provided value is used.
Facet that registers transaction extenders. Each extender can add additional effects or annotations to a transaction after filters have run. Returns null to leave the transaction unchanged.
Facet that registers transaction filters. Each filter can modify or replace a transaction before it is applied to the state. Filters can return either a modified transaction or a list of transaction specs.
Functions
Create a SelectionSpec placing the cursor at pos.
Convert this String to an InsertContent for use in ChangeSpec.Single.
Convert this EditorSelection to a SelectionSpec.
Find the code point at the given position in a string (like the codePointAt(https://developer.mozilla.org/en-US/docs/Web/JavaScript/ Reference/Global_Objects/String/codePointAt) string method).
The amount of positions a character takes up in a Kotlin string.
Utility function for combining behaviors to fill in a config object from an array of provided configs. defaults should hold default values for all optional fields in the config.
Count the column position at the given offset into the string, taking extending characters and tab size into account.
Define a StateField using a DSL builder.
Create an EditorState using a DSL builder.
Create an ExtensionList from the given extensions.
Returns a next grapheme cluster break after (not equal to) pos, if forward is true, or before otherwise. Returns pos itself if no further cluster break is available in the string. Moves across surrogate pairs, extending characters (when includeExtending is true), characters joined with zero-width joiners, and flag emoji.
Find the offset that corresponds to the given column position in a string, taking extending characters and tab size into account. By default, the string length is returned when it is too short to reach the column. Pass strict true to make it return -1 in that situation.
Given a Unicode codepoint, return the Kotlin string that represents it (like String.fromCodePoint(https://developer.mozilla.org/en-US/docs/ Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)).
Deserialize an EditorState from its EditorStateData representation.
Property delegate for reading a StateField value from EditorState.
Query whether the given character has a Grapheme_Cluster_Break value of Extend in Unicode.
Build a LanguageDataMap from type-safe entries.
Combine two extensions into an ExtensionList.
Build a RangeSet using the RangeSetBuilder DSL.
Convert this selection to a serializable EditorSelectionData.
Convert this range to a serializable SelectionRangeData.
Serialize this state to an EditorStateData.
Restore an EditorSelection from its serializable representation.
Create a boolean StateField with toggle and set effects.
Restore a SelectionRange from its serializable representation.
Create a TransactionSpec using a DSL builder.