super_editor library

Classes

AddTextAttributionsCommand
Applies the given attributions to the given documentSelection.
AndroidCursorPainter
A CustomPainter that paints an Android-style caret.
AndroidDocumentGestureEditingController
Controls the display of drag handles, a magnifier, and a floating toolbar, assuming Android-style behavior for the handles.
AndroidSelectionHandle
AndroidTextEditingFloatingToolbar
AndroidTextFieldCaret
An Android-style blinking caret.
AttributedSpans
A set of spans, each with an associated Attribution, that take up some amount of space in a discrete range.
AttributedText
Text with attributions applied to desired spans of text.
AttributedTextEditingController
Attribution
An attribution that can be associated with a span within an AttributedSpan.
AttributionSpan
An Attribution span from start to end, inclusive.
AttributionVisitor
Visitor that visits every start and end attribution marker in an AttributedText
AxisOffset
A distance from the leading and trailing boundaries of an axis-aligned area.
BinaryNodePosition
Document position for a DocumentNode that is either fully selected or unselected, like an image or a horizontal rule.
BinarySelection
Document selection for a DocumentNode that is either fully selected or unselected, like an image or a horizontal rule.
BlockNode
Base implementation for a DocumentNode that only supports UpstreamDownstreamNodeSelections.
BlockquoteComponent
Displays a blockquote in a document.
BlockquoteComponentBuilder
BlockquoteComponentViewModel
BlockSelector
Selects blocks in a document that matches a given rule.
BoxComponent
Editor layout component that displays content that is either entirely selected, or not selected, like an image or a horizontal rule.
CallbackAttributionVisitor
AttributionVisitor that delegates to given callbacks.
CaretDocumentOverlay
Document overlay that paints a caret with the given caretStyle.
CaretPainter
CaretStyle
CascadingPadding
Padding that accepts null padding values for desired sides, so that this CascadingPadding can combine with other CascadingPaddings to produce an overall padding configuration.
ChangeListItemTypeCommand
ClosureAwareDeltaTextInputClientDecorator
A DeltaTextInputClientDecorator that notifies _onConnectionClosed when the IME connection closes.
CombineParagraphsCommand
Combines two consecutive ParagraphNodes, indicated by firstNodeId and secondNodeId, respectively.
CommonEditorOperations
Performs common, high-level editing and composition tasks with a simplified API.
ComponentBuilder
Creates view models and components to display various DocumentNodes in a Document.
ComposerPreferences
Holds preferences about user input, to be used for the next character that is entered. This facilitates things like a "bold mode" or "italics mode" when there is no bold or italics text around the caret.
ContentTapDelegate
Delegate for mouse status and clicking on special types of content, e.g., tapping on a link open the URL.
ConvertBlockquoteToParagraphCommand
ConvertListItemToParagraphCommand
ConvertParagraphToListItemCommand
ConvertParagraphToTaskCommand
DebugPaintConfig
Configures the aspects of a document that show debug paint.
DefaultCaretOverlayBuilder
A DocumentLayerBuilder that paints a caret at the primary selection extent in a SuperEditor.
DefaultSuperTextFieldKeyboardHandlers
DeleteNodeCommand
DeleteParagraphsCommand
DeleteSelectionCommand
DeltaTextInputClientDecorator
A DeltaTextInputClient that forwards all calls to the given _client.
Document
A read-only document with styled text and multimedia elements.
DocumentComposer
Maintains a DocumentSelection within a Document and uses that selection to edit the document.
DocumentEditor
Editor for a Document.
DocumentEditorTransaction
Accumulates changes to a document to facilitate editing actions.
DocumentImeInputClient
Sends messages to, and receives messages from, the platform Input Method Engine (IME), for the purpose of document editing. A TextInputClient that applies IME operations to a Document.
DocumentImeSerializer
Serializes a Document and DocumentSelection into a form that's understood by the Input Method Engine (IME), and vis-a-versa.
DocumentLayerBuilder
Builds widgets that are displayed at the same position and size as the document layout within a SuperEditor.
DocumentLayout
Abstract representation of a document layout.
DocumentMouseInteractor
Governs mouse gesture interaction with a document, such as scrolling a document with a scroll wheel, tapping to place a caret, and tap-and-dragging to create an expanded selection.
DocumentNode
A single content node within a Document.
DocumentNodeSelection<SelectionType extends NodeSelection>
Description of a selection within a specific node in a document.
DocumentPosition
A logical position within a Document.
DocumentRange
A span within a Document that begins at start and ends at end.
DocumentSelection
A selection within a Document.
DocumentSelectionChange
Represents a change of a DocumentSelection.
DocumentSelectionOpenAndCloseImePolicy
Widget that enforces policies between IME connections, focus, and document selections.
DragHandleAutoScroller
Auto-scrolls a given ScrollPosition based on the current position of a drag handle near the boundary of the scroll region.
DragRectanglePainter
Paints a rectangle border around the given selectionRect.
EditContext
Collection of core artifacts used to edit a document.
EditorCommand
A command that alters a Document by applying changes in a DocumentEditorTransaction.
EditorCommandFunction
Functional version of an EditorCommand for commands that don't require variables or private functions.
EditorSelectionAndFocusPolicy
Widget that applies policies to an editor's focus and selection, such as placing the caret at the end of a document when the editor receives focus, and clearing the selection when the editor loses focus.
ExpectedSpans
FloatingCursorController
FocusWithCustomParent
Copy of Focus that configures its FocusNode with the given parentNode, rather than automatically re-parenting based on the widget tree structure.
FunctionalDocumentLayerBuilder
A DocumentLayerBuilder that's implemented with a given function, so that simple use-cases don't need to sub-class DocumentLayerBuilder.
GestureEditingController
Controls the display and position of a magnifier and a floating toolbar using a MagnifierAndToolbarController as the source of truth.
HorizontalRuleComponent
Displays a horizontal rule in a document.
HorizontalRuleComponentBuilder
HorizontalRuleComponentViewModel
HorizontalRuleNode
DocumentNode for a horizontal rule, which represents a full-width horizontal separation in a document.
ImageComponent
Displays an image in a document.
ImageComponentBuilder
ImageComponentViewModel
ImageNode
DocumentNode that represents an image at a URL.
ImeAttributedTextEditingController
An AttributedTextEditingController that integrates the platform's Input Method Engine (IME) changes into the text, selection, and composing region of a text field's content.
ImeFocusPolicy
Widget that opens and closes an imeConnection based on the focusNode gaining and losing primary focus.
ImeInputOwner
A widget that internally accepts IME input.
IndentListItemCommand
InsertAttributedTextCommand
InsertNewTaskOrSplitExistingTaskCommand
InsertTextCommand
IOSCollapsedHandle
An iOS-style caret/collapsed selection handle.
IosDocumentGestureEditingController
Controls the display of drag handles, a magnifier, and a floating toolbar, assuming iOS-style behavior for the handles.
IosDocumentTouchEditingControls
IOSSelectionHandle
An iOS-style text selection handle.
IOSTextEditingFloatingToolbar
IOSTextFieldCaret
An iOS-style blinking caret.
IOSTextFieldTouchInteractor
iOS text field touch interaction surface.
IOSTextFieldTouchInteractorState
KeyboardEditingToolbar
Toolbar that provides document editing capabilities, like converting paragraphs to blockquotes and list items, and inserting horizontal rules.
LinkAttribution
Attribution to be used within AttributedText to represent a link.
ListenableBuilder
Widget that rebuilds its builder every time the given listenable changes.
ListItemComponentBuilder
ListItemComponentViewModel
ListItemNode
Logger
LogNames
MagnifierAndToolbarController
Controls the display and position of a magnifier and a floating toolbar.
MagnifyingGlass
A magnifying glass that enlarges the content beneath it.
MovementModifier
Preferences for how the document selection should change, e.g., move word-by-word instead of character-by-character.
MultiAttributionSpan
A span that contains zero or more attributions.
MultiListenableBuilder
Builder that runs every time one of the given listenables changes.
MutableDocument
An in-memory, mutable Document.
NamedAttribution
Attribution that is defined by a given String.
NodePosition
Marker interface for all node positions.
NodeSelection
Marker interface for a selection within a DocumentNode.
NonReparentingFocus
Widget that responds to keyboard events for a given focusNode without necessarily re-parenting the focusNode.
OrderedListItemComponent
Displays an ordered list item in a document.
ParagraphComponentBuilder
ParagraphComponentViewModel
ParagraphNode
ReadOnlyAndroidDocumentTouchInteractor
Read-only document gesture interactor that's designed for Android touch input, e.g., drag to scroll, and handles to control selection.
ReadOnlyDocumentKeyboardInteractor
Governs document input that comes from a physical keyboard.
ReadOnlyDocumentLayerBuilder
Builds widgets that are displayed at the same position and size as the document layout within a SuperReader.
ReadOnlyDocumentMouseInteractor
Governs mouse gesture interaction with a read-only document, such as scrolling a document with a scroll wheel and tap-and-dragging to create an expanded selection. Document gesture interactor that's designed for read-only mouse input, e.g., drag to select, and mouse wheel to scroll.
ReadOnlyIOSDocumentTouchInteractor
Document gesture interactor that's designed for iOS touch input, e.g., drag to scroll, and handles to control selection.
RemoveTextAttributionsCommand
Removes the given attributions from the given documentSelection.
ScrollableDocument
Platform independent tools for touch gesture interaction with a document, such as dragging to scroll a document, and dragging handles to expand a selection.
ScrollableInstrumentation
Connections to, and information about a scrolling experience that's used for visual debugging.
ScrollingMinimap
A miniature display of a Scrollable viewport and the boundary of its content, which helps to diagnose scrolling bugs.
ScrollingMinimapPainter
Paints a minimap for a Scrollable, showing a miniature viewport, scroll offset, current scroll direction, etc.
ScrollingMinimaps
Repository of scrolling minimap statuses, used to coordinate between a Scrollable and the minimap that represents that Scrollable.
ScrollingMinimapsRepository
SelectableBox
SelectionReason
Holds common reasons for selection changes. Developers aren't limited to these selection change reasons. Any object can be passed as a reason for a selection change. However, some Super Editor behavior is based on userInteraction.
SelectionStyles
Styles applied to the user's selection, e.g., selected text.
SingleColumnDocumentComponentContext
Information that is provided to a ComponentBuilder to construct an appropriate DocumentComponent widget.
SingleColumnDocumentLayout
Displays a document in a single-column layout.
SingleColumnLayoutComponentStyles
SingleColumnLayoutComponentViewModel
Base class for a component view model that appears within a SingleColumnDocumentLayout.
SingleColumnLayoutCustomComponentStyler
SingleColumnLayoutStylePhase that applies custom styling to specific components.
SingleColumnLayoutPresenter
Produces SingleColumnLayoutViewModels to be displayed by a SingleColumnDocumentLayout.
SingleColumnLayoutPresenterChangeListener
SingleColumnLayoutSelectionStyler
SingleColumnLayoutStylePhase that applies visual selections to each component, e.g., text selections, image selections, caret positioning.
SingleColumnLayoutStylePhase
A single phase of style rules, which are applied in a pipeline to a baseline SingleColumnLayoutViewModel.
SingleColumnLayoutViewModel
View model for an entire SingleColumnDocumentLayout.
SingleColumnStylesheetStyler
Style phase that applies a given Stylesheet to the document view model.
SoftwareKeyboardController
SuperEditor controller that opens and closes the software keyboard.
SoftwareKeyboardControllerDelegate
Delegate that's attached to a SoftwareKeyboardController, which implements the opening and closing of the software keyboard.
SoftwareKeyboardOpener
Widget that opens and closes the software keyboard, when requested.
SpanMarker
Marks the start or end of an attribution span.
SpanRange
A range of characters in a string of text, based on Flutter's TextRange.
SplitBlockquoteCommand
SplitListItemCommand
SplitParagraphCommand
Splits the ParagraphNode affiliated with the given nodeId at the given splitPosition, placing all text after splitPosition in a new ParagraphNode with the given newNodeId, inserted after the original node.
StyledHintBuilder
Builds a hint widget based on given hintText and a hintTextStyleBuilder.
StyleRule
A single style rule within a Stylesheet.
Stylesheet
Stylesheet for styling content within a document.
SuperAndroidTextField
SuperAndroidTextFieldState
SuperDesktopTextField
Highly configurable text field intended for web and desktop uses.
SuperDesktopTextFieldState
SuperEditor
A rich text editor that displays a document in a single-column layout.
SuperEditorDebugVisuals
SuperEditorDebugVisualsConfig
SuperEditorFocusDebugVisuals
SuperEditorHardwareKeyHandler
Applies appropriate edits to a document and selection when the user presses hardware keys.
SuperEditorImeConfiguration
Input Method Engine (IME) configuration for document text input.
SuperEditorImeDebugVisuals
SuperEditorImeInteractor
SuperEditor interactor that edits a document based on IME input from the operating system.
SuperEditorImeInteractorState
SuperEditorImePolicies
A collection of policies that dictate how a SuperEditor's focus, selection, and IME should interact, such as opening the software keyboard whenever SuperEditor's selection changes (openKeyboardOnSelectionChange).
SuperEditorLaunchLinkTapHandler
A ContentTapDelegate that opens links when the user taps text with a LinkAttribution.
SuperEditorSelectionPolicies
A collection of policies that dictate how a SuperEditor's selection will change based on other behaviors, such as focus changes.
SuperEditorState
SuperIOSTextField
SuperIOSTextFieldState
SuperReader
SuperReaderContext
Collection of core artifacts used to display a read-only document.
SuperReaderLaunchLinkTapHandler
A ContentTapDelegate that opens links when the user taps text with a LinkAttribution.
SuperReaderState
SuperTextField
Custom text field implementations that offer greater control than traditional Flutter text fields.
SuperTextFieldGestureInteractor
Handles all user gesture interactions for text entry.
SuperTextFieldImeInteractor
Opens and closes an IME connection based on changes to focus and selection.
SuperTextFieldKeyboardInteractor
Handles all keyboard interactions for text entry in a text field.
SuperTextFieldScrollview
Handles all scrolling behavior for a text field.
SuperTextFieldScrollviewState
SuperTextFieldState
TapSequenceGestureRecognizer
Recognizes when the user has tapped the screen at the same location one, two, and three times.
TaskComponent
A document component that displays a complete-able task.
TaskComponentBuilder
Builds TaskComponentViewModels and TaskComponents for every TaskNode in a document.
TaskComponentViewModel
View model that configures the appearance of a TaskComponent.
TaskNode
This file includes everything needed to add the concept of a task to Super Editor. This includes:
TextComponent
Displays text in a document.
TextComponentState
TextComposable
Contract for widgets that include editable text.
TextDeltasDocumentEditor
Applies software keyboard text deltas to a document.
TextInputConnectionDecorator
Base class for TextInputConnection decorators.
TextLayoutCaret
TextLayoutCaretState
TextNode
TextNodePosition
A logical position within a TextNode.
TextNodeSelection
A logical selection within a TextNode.
TextScrollController
TextScrollControllerDelegate
TextScrollView
A scrollable that positions its child based on text metrics.
TextWithHintComponent
Document component that displays hint text when its content text is empty.
ToggleTextAttributionsCommand
Applies the given attributions to the given documentSelection, if none of the content in the selection contains any of the given attributions. Otherwise, all the given attributions are removed from the content within the documentSelection.
ToolbarConfig
Configuration used to display a toolbar.
UnIndentListItemCommand
UnknownComponent
Displays a Placeholder widget within a document layout.
UnknownComponentBuilder
UnorderedListItemComponent
Displays a un-ordered list item in a document.
UpstreamDownstreamNodePosition
NodePosition that either sits at the upstream edge, or the downstream edge of the given content, like sitting before or after an image.
UpstreamDownstreamNodeSelection
A NodeSelection for a DocumentNode that only supports an upstream and downstream position, like a caret sitting before or after an image.

Enums

AttributionVisitEvent
DocumentGestureMode
The mode of user gesture input.
ExecutionInstruction
HandleType
Type of handle for touch editing.
HintBehavior
Policy that dictates when to display a hint in a Super Text Field.
ListItemType
PrependedCharacterPolicy
SelectionType
SpanMarkerType
The type of a marker within a span, either start or end.
SuperTextFieldPlatformConfiguration
Configures a SuperTextField for the given platform.
TapHandlingInstruction
TextFieldKeyboardHandlerResult
TextFieldSizePolicy
TextInputSource
The mode of user text input.
ViewportEdge

Mixins

DocumentComponent<T extends StatefulWidget>
Contract for all widgets that operate as document components within a DocumentLayout.
ProxyDocumentComponent<T extends StatefulWidget>
A DocumentComponent that wraps, and defers to, another DocumentComponent.
ProxyTextComposable
TextComposable that wraps, and defers to, a child TextComposable.
TextComponentViewModel
Mixin for all SingleColumnLayoutComponentViewModels that represent a text-based block, e.g., paragraph, blockquote, list item.

Constants

blockquoteAttribution → const NamedAttribution
Blockquote attribution
boldAttribution → const NamedAttribution
Bold style attribution.
codeAttribution → const NamedAttribution
Code style attribution.
defaultAndroidControlsColor → const Color
defaultDesktopCaretColor → const Color
defaultIOSControlsColor → const Color
defaultSelectionColor → const Color
defaultSelectionStyle → const SelectionStyles
Default visual styles related to content selection.
defaultTextFieldImeKeyboardHandlers → const List<TextFieldKeyboardHandler>
The keyboard actions that a SuperTextField uses by default when using TextInputSource.ime.
defaultTextFieldKeyboardHandlers → const List<TextFieldKeyboardHandler>
The keyboard actions that a SuperTextField uses by default.
header1Attribution → const NamedAttribution
Header 1 style attribution.
header2Attribution → const NamedAttribution
Header 2 style attribution.
header3Attribution → const NamedAttribution
Header 3 style attribution.
header4Attribution → const NamedAttribution
Header 4 style attribution.
header5Attribution → const NamedAttribution
Header 5 style attribution.
header6Attribution → const NamedAttribution
Header 6 style attribution.
italicsAttribution → const NamedAttribution
Italics style attribution.
kTapMinTime → const Duration
kTapTimeout → const Duration
primaryCaretKey → const ValueKey<String>
readOnlyDefaultSelectionStyle → const SelectionStyles
Default visual styles related to content selection.
strikethroughAttribution → const NamedAttribution
Strikethrough style attribution.
underlineAttribution → const NamedAttribution
Underline style attribution.

Properties

androidTextFieldLog → Logger
final
attributionsLog → Logger
final
contentLayersLog → Logger
final
copyWhenCmdCIsPressedOnMac ReadOnlyDocumentKeyboardAction
final
copyWhenCtlCIsPressedOnWindowsAndLinux ReadOnlyDocumentKeyboardAction
final
defaultComponentBuilders List<ComponentBuilder>
Creates visual components for the standard SuperEditor.
final
defaultImeKeyboardActions List<DocumentKeyboardAction>
Keyboard actions for a SuperEditor running with IME on desktop.
final
defaultKeyboardActions List<DocumentKeyboardAction>
Keyboard actions for the standard SuperEditor.
final
defaultStylesheet Stylesheet
Stylesheet applied to all SuperEditors by default.
final
docGesturesLog → Logger
final
editorDocLog → Logger
final
editorGesturesLog → Logger
final
editorImeConnectionLog → Logger
final
editorImeLog → Logger
final
editorKeyLog → Logger
final
editorLayoutLog → Logger
final
editorLog → Logger
final
editorOpsLog → Logger
final
editorPoliciesLog → Logger
final
editorScrollingLog → Logger
final
editorStyleLog → Logger
final
expandSelectionToLineEndWithCtrlEOnWindowsAndLinux ReadOnlyDocumentKeyboardAction
final
expandSelectionToLineEndWithEndOnWindowsAndLinux ReadOnlyDocumentKeyboardAction
final
expandSelectionToLineStartWithCtrlAOnWindowsAndLinux ReadOnlyDocumentKeyboardAction
final
expandSelectionToLineStartWithHomeOnWindowsAndLinux ReadOnlyDocumentKeyboardAction
final
expandSelectionWithDownArrow ReadOnlyDocumentKeyboardAction
final
expandSelectionWithLeftArrow ReadOnlyDocumentKeyboardAction
final
expandSelectionWithRightArrow ReadOnlyDocumentKeyboardAction
final
expandSelectionWithUpArrow ReadOnlyDocumentKeyboardAction
final
imeTextFieldLog → Logger
final
infrastructureLog → Logger
final
iosTextFieldLog → Logger
final
readerDocLog → Logger
final
readerGesturesLog → Logger
final
readerImeLog → Logger
final
readerKeyLog → Logger
final
readerLayoutLog → Logger
final
readerLog → Logger
final
readerOpsLog → Logger
final
readerScrollingLog → Logger
final
readerStyleLog → Logger
final
readOnlyDefaultComponentBuilders List<ComponentBuilder>
Creates visual components for the standard SuperReader.
final
readOnlyDefaultKeyboardActions List<ReadOnlyDocumentKeyboardAction>
Keyboard actions for the standard SuperReader.
final
readOnlyDefaultStylesheet Stylesheet
Stylesheet applied to all SuperReaders by default.
final
removeCollapsedSelectionWhenShiftIsReleased ReadOnlyDocumentKeyboardAction
Shortcut to remove a document selection when the shift key is released and the selection is collapsed.
final
schedulerLog → Logger
final
scrollDownWithArrowKey ReadOnlyDocumentKeyboardAction
final
scrollingTextFieldLog → Logger
final
scrollUpWithArrowKey ReadOnlyDocumentKeyboardAction
final
selectAllWhenCmdAIsPressedOnMac ReadOnlyDocumentKeyboardAction
final
selectAllWhenCtlAIsPressedOnWindowsAndLinux ReadOnlyDocumentKeyboardAction
final
taskStyles StyleRule
Styles all task components to apply top padding
final
textFieldLog → Logger
final

Functions

anyCharacterOrDestructiveKeyToDeleteSelection({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
anyCharacterToInsertInParagraph({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
anyCharacterToInsertInTextContent({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
backspaceToClearParagraphBlockType({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
When the caret is collapsed at the beginning of a ParagraphNode and backspace is pressed, clear any existing block type, e.g., header 1, header 2, blockquote.
backspaceToRemoveUpstreamContent({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
backspaceToUnIndentListItem({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
cmdBToToggleBold({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
cmdIToToggleItalics({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
collapseSelectionWhenEscIsPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
When the ESC key is pressed, the editor should collapse the expanded selection.
copy({required Document document, required DocumentSelection selection}) → void
Serializes the current selection to plain text, and adds it to the clipboard.
copyWhenCmdCIsPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
createShortcut(ReadOnlyDocumentKeyboardAction action, {LogicalKeyboardKey? keyPressedOrReleased, Set<LogicalKeyboardKey>? triggers, bool? isShiftPressed, bool? isCmdPressed, bool? isCtlPressed, bool? isAltPressed, bool onKeyUp = true, bool onKeyDown = false, Set<TargetPlatform>? platforms}) ReadOnlyDocumentKeyboardAction
A proxy for a ReadOnlyDocumentKeyboardAction that filters events based on onKeyUp, onKeyDown, and shortcut.
cutWhenCmdXIsPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
deactivateLoggers(Set<Logger> loggers) → void
defaultHintStyleBuilder(Set<Attribution> attributions) TextStyle
Creates default TextStyles for hint text in a super text field.
defaultInlineTextStyler(Set<Attribution> attributions, TextStyle existingStyle) TextStyle
defaultStyleBuilder(Set<Attribution> attributions) TextStyle
Creates TextStyles for the standard SuperEditor.
defaultTextFieldStyleBuilder(Set<Attribution> attributions) TextStyle
Default TextStyles for SuperTextField.
deleteCharacterWhenBackspaceIsPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
deleteLineWithCmdBksp({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
deleteToRemoveDownstreamContent({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
deleteWordWithAltBksp({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
doNothingWhenThereIsNoSelection({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
enterToInsertBlockNewline({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
enterToInsertNewTask({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
expandPositionToParagraph({required String text, required TextPosition textPosition}) TextSelection
Expands a selection in both directions starting at textPosition until the selection reaches a newline, or the end of the available text.
expandPositionToWord({required String text, required TextPosition textPosition}) TextSelection
Expands a selection in both directions starting at textPosition until the selection reaches a space, or the end of the available text.
getCharacterEndBounds(String text, int startingCodePointIndex) int
Returns the code point index for the code point that ends the visual character that begins at startingCodePointIndex.
getCharacterStartBounds(String text, int endingCodePointIndex) int
Returns the code point index for the code point that begins the visual character that ends at endingCodePointIndex.
getParagraphDirection(String text) TextDirection
Returns the TextDirection of the text based on its first non-whitespace character.
getParagraphSelection({required DocumentPosition docPosition, required DocumentLayout docLayout}) DocumentSelection?
Returns the paragraph of text that contains the given docPosition, or null if there is no text at the given docPosition.
getWordSelection({required DocumentPosition docPosition, required DocumentLayout docLayout}) DocumentSelection?
Returns the word of text that contains the given docPosition, or null if no text exists at the given docPosition.
ignoreKeyCombos(List<ShortcutActivator> keys) DocumentKeyboardAction
A DocumentKeyboardAction that reports ExecutionInstruction.blocked for any key combination that matches one of the given keys.
ignoreTextFieldKeyCombos(List<ShortcutActivator> keys) TextFieldKeyboardHandler
A TextFieldKeyboardHandler that reports TextFieldKeyboardHandlerResult.blocked for any key combination that matches one of the given keys.
initAllLogs(Level level) → void
initLoggers(Level level, Set<Logger> loggers) → void
insertNewlineInBlockquote({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
isCharacterBlacklisted(String character) bool
This method is the implementation for isKeyEventCharacterBlacklisted, but without the kIsWeb check, so that the behavior can be unit tested.
isKeyEventCharacterBlacklisted(String? character) bool
Whether the given character should be ignored when it's received within a KeyEvent on web.
isLogActive(Logger logger) bool
Returns true if the given logger is currently logging, or false otherwise.
mergeNodeWithNextWhenDeleteIsPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
moveCaretDown({required Document document, required DocumentLayout documentLayout, required ValueNotifier<DocumentSelection?> selectionNotifier, required bool retainCollapsedSelection}) bool
Moves the DocumentComposer's selection extent position down, vertically, either by moving the selection extent down one line of text, or by moving the selection extent down to the node below the current extent.
moveCaretDownstream({required Document document, required DocumentLayout documentLayout, required ValueNotifier<DocumentSelection?> selectionNotifier, MovementModifier? movementModifier, required bool retainCollapsedSelection}) bool
Moves the DocumentComposer's selection extent position in the downstream direction (to the right for left-to-right languages).
moveCaretUp({required Document document, required ValueNotifier<DocumentSelection?> selectionNotifier, required DocumentLayout documentLayout, required bool retainCollapsedSelection}) bool
Moves the DocumentComposer's selection extent position up, vertically, either by moving the selection extent up one line of text, or by moving the selection extent up to the node above the current extent.
moveCaretUpstream({required Document document, required DocumentLayout documentLayout, required ValueNotifier<DocumentSelection?> selectionNotifier, MovementModifier? movementModifier, required bool retainCollapsedSelection}) bool
moveParagraphSelectionUpWhenBackspaceIsPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
moveSelectionToNearestSelectableNode({required Document document, required DocumentLayoutResolver documentLayoutResolver, required ValueNotifier<DocumentSelection?> selection, required DocumentNode startingNode, bool expand = false}) bool
Moves the DocumentComposer's selection to the nearest node to startingNode, whose DocumentComponent is visually selectable.
moveToLineEndWithEnd({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
moveToLineStartOrEndWithCtrlAOrE({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
moveToLineStartWithHome({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
moveToNearestSelectableComponent(Document document, DocumentLayout documentLayout, ValueNotifier<DocumentSelection?> selection, String nodeId, DocumentComponent<StatefulWidget> component) → void
moveUpDownLeftAndRightWithArrowKeys({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
noStyleBuilder(Set<Attribution> attributions) TextStyle
AttributionStyleBuilder that returns a default TextStyle, for use when creating baseline view models before the text styles are configured.
pasteWhenCmdVIsPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
printLog(LogRecord record) → void
readOnlyDefaultInlineTextStyler(Set<Attribution> attributions, TextStyle existingStyle) TextStyle
readOnlyDefaultStyleBuilder(Set<Attribution> attributions) TextStyle
Creates TextStyles for the standard SuperReader.
selectAll(Document document, ValueNotifier<DocumentSelection?> selection) bool
Sets the selection's value to include the entire Document.
selectAllWhenCmdAIsPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
selectBlockAt(DocumentPosition position, ValueNotifier<DocumentSelection?> selection) bool
selectParagraphAt({required DocumentPosition docPosition, required DocumentLayout docLayout, required ValueNotifier<DocumentSelection?> selection}) bool
selectRegion({required DocumentLayout documentLayout, required Offset baseOffsetInDocument, required Offset extentOffsetInDocument, required SelectionType selectionType, bool expandSelection = false, required ValueNotifier<DocumentSelection?> selection}) → void
Calculates an appropriate DocumentSelection from an (x,y) baseOffsetInDocument, to an (x,y) extentOffsetInDocument, setting the new document selection in the given selection.
selectWordAt({required DocumentPosition docPosition, required DocumentLayout docLayout, required ValueNotifier<DocumentSelection?> selection}) bool
shiftEnterToInsertNewlineInBlock({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
shiftTabToUnIndentListItem({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
splitBlockquoteWhenEnterPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
splitListItemWhenEnterPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
superEditorLaunchLinkTapHandlerFactory(EditContext editContext) SuperEditorLaunchLinkTapHandler
superReaderLaunchLinkTapHandlerFactory(SuperReaderContext readerContext) SuperReaderLaunchLinkTapHandler
tabToIndentListItem({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction
toggleInteractionModeWhenCmdOrCtrlPressed({required EditContext editContext, required RawKeyEvent keyEvent}) ExecutionInstruction

Typedefs

AttributionFilter = bool Function(Attribution candidate)
Returns true when the given candidate Attribution matches the desired condition.
AttributionStyleAdjuster = TextStyle Function(Set<Attribution> attributions, TextStyle existingStyle)
Adjusts the given existingStyle based on the given attributions.
AttributionStyleBuilder = TextStyle Function(Set<Attribution> attributions)
Creates the desired TextStyle given the attributions associated with a span of text.
DecorationBuilder = Widget Function(BuildContext, Widget child)
DocumentKeyboardAction = ExecutionInstruction Function({required EditContext editContext, required RawKeyEvent keyEvent})
Executes this action, if the action wants to run, and returns a desired ExecutionInstruction to either continue or halt execution of actions.
DocumentLayoutResolver = DocumentLayout Function()
Obtains a DocumentLayout.
GestureDoubleTapCallback = void Function()
OrderedListItemNumeralBuilder = Widget Function(BuildContext, OrderedListItemComponent)
ReadOnlyDocumentKeyboardAction = ExecutionInstruction Function({required SuperReaderContext documentContext, required RawKeyEvent keyEvent})
Executes this action, if the action wants to run, and returns a desired ExecutionInstruction to either continue or halt execution of actions.
RightClickListener = void Function(BuildContext textFieldContext, AttributedTextEditingController textController, Offset textFieldOffset)
Styler = Map<String, dynamic> Function(Document, DocumentNode)
Generates style metadata for the given DocumentNode within the Document.
SuperEditorContentTapDelegateFactory = ContentTapDelegate Function(EditContext editContext)
SuperReaderContentTapDelegateFactory = ContentTapDelegate Function(SuperReaderContext editContext)
TextFieldKeyboardHandler = TextFieldKeyboardHandlerResult Function({required AttributedTextEditingController controller, required RawKeyEvent keyEvent, required ProseTextLayout textLayout})
TextInputConnectionFactory = TextInputConnection Function(TextInputClient client, TextInputConfiguration configuration)
UnorderedListItemDotBuilder = Widget Function(BuildContext, UnorderedListItemComponent)
ViewModelChangeCallback = void Function({required List<String> addedComponents, required List<String> changedComponents, required List<String> removedComponents})
VisitAttributionsCallback = void Function(AttributedText fullText, int index, Set<Attribution> startingAttributions, Set<Attribution> endingAttributions)
Visits every index in the the given AttributedText which has at least one start or end marker, passing the attributions that start or end at the index.
VoidCallback = void Function()
A zero-parameter function that returns nothing.