Package-level declarations
Types
A block cursor position to render as an overlay rectangle.
Base class for all decoration types.
A set of decorations.
A plugin value that contributes decorations.
Layout measurements for the editor. Nested inside EditorTheme to separate layout concerns from color properties.
An editor session holds the editor state and dispatches transactions.
Color/style tokens for the editor. Passed through a CompositionLocal so every composable in the editor tree can read them without prop-drilling.
Configuration for a gutter column.
A gutter marker contributes to a specific line's gutter column.
Identifies the type of a gutter column.
A key binding maps a key name (e.g. "Ctrl-Enter") to a command.
Builder scope for defining key bindings via DSL.
Marks DSL scope for KeymapBuilder.
A line decoration adds attributes to the containing line element.
Spec for a line decoration (whole-line styling).
Cached layout result for a single document line.
A mark decoration applies styling to a range of text.
Spec for a mark decoration (inline text styling).
Port of matchdecorator.ts — applies a decoration to every match of a regular expression in the visible document range.
Specification for a ViewPlugin.
A plugin value is the mutable instance managed by a ViewPlugin.
A replace decoration hides a range of text, optionally showing a widget.
Spec for a replace decoration (hides/replaces a range).
Margin spec for scroll target offsets.
How to position the viewport when scrolling to a target.
Describes a scroll-into-view request.
A typed key for extensible theme properties. Modules define their own keys with sensible defaults; themes can override them via themeExtras.
A view plugin contributes behaviour and/or decorations to the editor view.
Snapshot of the view's layout state. Created fresh for each recomposition.
Describes an update to the editor.
A widget decoration places a composable inside the text flow.
Spec for a widget decoration (inline widget).
Base class for custom inline/block widgets. Subclasses implement Content as a Compose composable instead of toDOM().
Properties
Facet for marking ranges as "atomic" — the cursor won't stop inside them.
Facet for extensions that provide block cursor positions.
Copy the current selection to the system clipboard.
Cut the current selection: copy to clipboard and delete.
Paste text from the system clipboard at the current cursor position.
Extension that changes the cursor to a crosshair when Alt is held, indicating rectangular selection mode is available.
Facet for contributing decoration sets from extensions and plugins. Multiple sources are collected into a list.
Default content text style with font metrics but no color.
Default font family for the editor.
A default dark theme.
Extension to select the draw-selection extension.
Extension that shows a cursor at the position where a drag is currently hovering, to indicate where a drop would land.
Facet for editor content text styling (font family, size, line height, color).
A Saver for EditorSelection that serializes to JSON.
Facet that lets extensions override the editor theme.
Facet that collects all registered gutter configurations.
Extension that highlights the line containing the primary cursor.
Extension that highlights the active line's gutter entry. Works in conjunction with highlightActiveLine.
Extension that highlights special (non-printing) characters with a placeholder widget.
Extension that highlights trailing whitespace (spaces and tabs at end of lines) with a warning-style background.
Extension that makes whitespace characters (spaces and tabs) visible by applying a subtle mark decoration. Spaces are shown with a centered dot character and tabs with an arrow.
Facet for extensions that need to suppress text input under certain conditions.
Facet that collects all key bindings from extensions.
A light theme.
Facet that allows extensions to contribute custom GutterMarkers to the line number gutter column. Each provider maps a line start position to an optional marker.
Extension that adds line numbers to the editor gutter.
Extension that enables soft line wrapping.
CompositionLocal that provides the resolved content text style.
CompositionLocal that provides the current EditorSession to panel and tooltip composables.
CompositionLocal that provides the current EditorTheme.
Facet that collects save handlers.
Facet for per-line class names added by extensions.
Extension that enables rectangular (column-mode) selection when the user Alt-drags through the editor.
Extension that binds Ctrl-S (and Cmd-S on macOS) to the save command.
Scroll margins around the cursor (pixels on each side).
A Saver for SelectionRange that serializes to JSON.
Facet that provides a single tooltip at a time.
Background color for special (non-printing) character placeholders.
Text color for special (non-printing) character placeholders.
Default regex that matches special / control characters to highlight.
Tab rendering extension.
Background color for trailing whitespace.
Color for visible whitespace marks (spaces and tabs).
Functions
Convenience extension to build a SpanStyle for active line.
Programmatically close all hover tooltips in the given session.
Dispatch a transaction built via DSL.
Draw the cursor and selection ranges as a per-line Modifier overlay.
Create an EditorSession with the given initial state and optional update callback.
Create a Saver for EditorSession that preserves the document and selection across configuration changes and process death.
Create a Saver for EditorState that preserves the document and selection.
Create an EditorTheme from semantic color values, designed for easy integration with Material Design color schemes.
Get all active panels in the given state.
Get all active tooltips in the given state, including both facet-provided tooltips and hover tooltips.
Find the character group (word/space/punctuation) at the given position.
Create an extension that adds a gutter column.
A composable that renders all registered gutter columns alongside the editor content.
Check whether any hover tooltips are currently active in the given session.
Show a hover tooltip when the user points at text matching source.
Create a keymap extension using a DSL builder.
Convenience: create an extension from a list of key bindings.
Convenience: create an extension from key bindings.
The main editor composable.
Log an exception that occurred during extension execution. Reports to handlers registered via exceptionSink, or prints to stderr if none are configured.
Move a selection range by one word group in forward direction.
Move a selection range by one subword in forward direction.
Move a selection range vertically by one line, keeping an approximate horizontal position.
Create an extension that launches callback in a coroutine whenever the document changes.
Create an extension that calls callback with the current selection whenever the selection changes.
Create an extension that launches callback in a coroutine whenever the selection changes.
A layout composable that wraps the editor content with top/bottom panels.
Create an extension that shows a composable widget as placeholder content when the document is empty.
Create an extension that shows text as placeholder text when the document is empty.
Merge additional extras into this theme's extras map.
Create and remember an EditorSession from an EditorStateConfig.
Create and remember an EditorSession with the given document text and extensions.
Remember the current value of a Facet, recomposing only when its value changes.
Remember the current value of a StateField, recomposing only when its value changes.
Create and remember an EditorSession that survives configuration changes and process death via rememberSaveable.
Force repositioning of all tooltips. In Compose, tooltips are automatically repositioned via state changes, so this is effectively a no-op. Provided for API compatibility with upstream CodeMirror.
Command that invokes all registered onSave handlers.
Extension that adds empty space after the last line of the document, allowing the user to scroll so the last line sits at the top.
Select the entire document.
Convenience extension to build a SpanStyle from theme colors.
Replace the entire document content with text.
A composable layer that renders all active tooltips using Popup.