editor library

The editor layer: controller, per-instance services, the extension API surface, theming, the IME/keyboard input helpers, the document render layer, the interactive QuillKitEditor, and the stateless QuillKitViewer.

Deliberately not exported: the editor widget's internals (geometry, IME client, painters, gesture layer) — they are implementation details of QuillKitEditor; only the widget itself and its two config classes (EditorBehavior, EditorAppearance) are public. The input helpers, including TextDiff/textDiff and the remote-value functions, are public so embedders can drive a controller from their own input plumbing.

Classes

AlignmentExtension
Line alignment and base text direction.
ApplyHeaderIntent
Formats the selected lines as a header of level (1–6), or back to a normal paragraph when level is 0. Applying the level a line already has toggles it off.
AutoLinkShortcut
Links a URL automatically when the user types a space or newline after it: see https://example.com turns the address into a link.
BlockquoteSpaceShortcut
'> ' at a line start → blockquote.
BlockStyleExtension
Block styles: headers, blockquote and code block.
BoldCharacterShortcut
'**bold**' or '__bold__' → bold.
BulletLeading
The glyph in front of a bullet-list line, varying with the indent level the way Quill does: , , , then repeating.
BulletListSpaceShortcut
'- ' or '* ' at a line start → bullet list.
CaretContext
The line context around a caret position, resolved for typing shortcuts.
CharacterShortcut
Base class for autoformats fired by typing the closing delimiter of a markdown inline span: '**bold**', '_italic_', '~~strike~~', '`code`'.
CheckboxLeading
The checkbox in front of a checklist line (list: checked/unchecked).
CheckboxStyle
Colors of the leading checkbox of checklist items (list: checked/unchecked).
ChecklistSpaceShortcut
'[] ' at a line start → unchecked checklist item, '[x] ' → checked.
ClipboardService
Clipboard access for the editor, injected per instance via EditorScope.
CodeBlockSpaceShortcut
'``` ' at a line start → code block.
CodeLineNumberLeading
The line number in the gutter of a code block, shown when the layout is built with line numbers enabled.
ColorExtension
Text and background (highlight) colors.
CursorStyle
Appearance of the editor's insertion cursor.
DocumentBuilder
Walks a Document's top-level nodes and produces the vertical list of block widgets that renders it — the layout half of the render layer, shared by the stateless viewer and the editor.
DocumentSpanBuilder
Builds the InlineSpan tree for one document Line — the single place where leaves become spans, shared by the stateless viewer and (in phase 4b) the editor.
EditorAppearance
How a QuillKitEditor is laid out: padding, size constraints and the empty-document placeholder.
EditorBehavior
How a QuillKitEditor behaves: focus, scrolling and IME preferences.
EditorExtension
The single add-on mechanism of the editor: every feature beyond plain text editing — including the built-in formats — is packaged as an extension.
EditorScope
The per-instance service and registry hub of one editor.
EditorShortcutActions
Binds the editor's intents to a controller.
EmbedRenderContext
Everything an EmbedRenderer.build implementation needs to render one embed occurrence.
EmbedRenderer
Renders embeds of one type ('image', 'video', ...).
FontExtension
Typography formats: font family, font size and line height.
HeaderSpaceShortcut
'# ''###### ' at a line start → header level 1–6.
HistoryExtension
Undo/redo toolbar buttons (the history toolbar group).
IndentIntent
Changes the indentation of the selected lines by delta levels (positive indents, negative outdents).
InlineCodeCharacterShortcut
'`code`' → inline code.
InlineCodeStyle
The "chip" look of inline code spans: a monospace text style plus the background painted behind the span.
ItalicCharacterShortcut
'*italic*' or '_italic_' → italic.
LineWidget
Renders one document Line as rich text.
LinkExtension
Hyperlinks: the link toolbar button and URL auto-linking while typing.
LinkLauncher
Opens link URLs on behalf of the editor, injected per instance via EditorScope.
ListExtension
Ordered, bullet and check lists plus indentation.
ListNumbering
Sequential numbering of the ordered-list lines within one list block, reproducing Quill's nested-list behavior.
NoopLinkLauncher
The default LinkLauncher: does nothing and reports false.
NumberPointLeading
The 1. / a. / i. marker in front of an ordered-list line.
OpenSearchIntent
Opens the in-document search UI. The action only fires the callback the widget layer provides — the controller has no UI of its own.
OrderedListSpaceShortcut
'1. ' at a line start → ordered list.
QuillKitController
The editing brain of a QuillKit editor: a Document plus a TextSelection, with commands that funnel every edit through the document's rules and history.
QuillKitEditor
The interactive QuillKit rich text editor.
QuillKitExtensions
Ready-made bundles of the built-in EditorExtensions.
QuillKitTheme
Provides a QuillKitThemeData to descendant QuillKit widgets.
QuillKitThemeData
The visual configuration of a QuillKit editor or viewer.
QuillKitViewer
A genuinely stateless, read-only renderer for a Quill Document — pure Delta → UI, with no controller, focus node, IME client or gesture machinery.
RecognizerBag
Owns the GestureRecognizers created while building spans, so they can be disposed together when the spans are discarded.
SpaceShortcut
Base class for autoformats fired by typing a space after a markdown prefix at the start of a line ('# ', '1. ', '> ', ...).
StrikeCharacterShortcut
'~~strike~~' → strikethrough.
StyleResolver
The single place where document Styles are mapped to Flutter text styles using a QuillKitThemeData.
SystemClipboardService
The default ClipboardService: plain text via Flutter's Clipboard platform API, no rich content.
TextBlockStyle
How one kind of text block (paragraph, header, quote, code block, list) is rendered: its base text style, its vertical spacing, and an optional box decoration painted behind the block.
TextDiff
The minimal edit turning one string into another: at start, deleted was removed and inserted took its place.
TextStyleExtension
Inline text formats: bold, italic, underline, strikethrough, inline code, sub/superscript and small.
ToggleStyleIntent
Toggles attribute on the current selection (bold, italic, underline, strike, inline code, lists, quote, ...). Bound by default to the platform's primary modifier + B/I/U etc.; handled via QuillKitController.formatSelection.
ToolbarItem
One declarative toolbar entry contributed by an EditorExtension.
ToolbarItemContext
Everything a ToolbarItem.build implementation needs to render one toolbar entry.
TypingShortcut
A markdown-style autoformat triggered while typing, such as '# ' at a line start turning the line into a header, or '**bold**' collapsing into bold text.
TypingShortcutEngine
Runs a controller's TypingShortcuts after each committed insertion.
UnknownEmbedPlaceholder
Placeholder rendered for embeds whose type has no matching EmbedRenderer.
VerticalSpacing
Vertical spacing applied above and below a laid-out element.

Functions

applyRemoteValue(QuillKitController controller, TextEditingValue value) bool
Applies value, an incoming IME state, to controller: diffs the text, replays the edit through the controller, adopts the new selection, and — when the insertion is a committed one (not mid-composition) — offers it to the controller's typing shortcuts. Returns whether the document changed.
buildRemoteValue(QuillKitController controller) TextEditingValue
The TextEditingValue the editor should push to the platform for the controller's current document and selection.
checklistAttribute({required bool checked}) Attribute<String?>
The attribute change a checkbox toggle maps to: list: checked when checked is true, list: unchecked otherwise.
defaultEditorShortcuts({TargetPlatform? platform}) Map<ShortcutActivator, Intent>
The default platform-aware keyboard map of the editor.
effectiveLineStyle(Line line) Style
The effective style of line: its own line attributes merged with the grouping attributes carried by its parent Block (list, code-block, blockquote), which is what StyleResolver.resolveBlock expects.
encodeQuillColor(Color color) String
Encodes color as a Quill color string: lowercase '#rrggbb' when fully opaque, '#aarrggbb' otherwise (the inverse of parseQuillColor).
formatListNumber(int number, int indentLevel) String
Formats an ordered-list ordinal the way Quill does, cycling the numeral system with the indent level: decimal (1), lowercase letters (a), lowercase roman (i), then decimal again.
lineAt(Document document, int lineIndex) Line?
The lineIndex-th line of document (0-based, counting every line in document order across blocks), or null when out of range.
parseQuillColor(String? source) Color?
Parses a Quill color string ('#RRGGBB' or '#AARRGGBB', case insensitive, # optional) into a Color.
textDiff(String oldText, String newText, int cursorPosition) TextDiff
Computes the edit that turned oldText into newText, using cursorPosition — the caret position in newText after the edit — to resolve ambiguity (in a run of identical characters the change is anchored so it ends at the caret, matching what the user actually typed).
toggleChecklistLine(Document document, int lineIndex, {required bool checked}) Delta
Applies a checkbox toggle to document: reformats the lineIndex-th line as list: checked/unchecked per checked and returns the change actually applied (empty when the line does not exist).

Typedefs

CheckboxTapCallback = void Function(int lineIndex, bool checked)
Signature of the viewer's/editor's checkbox tap callbacks: the 0-based index of the tapped line (see lineAt) and the checkbox's new state.