Overview
AppFlowyEditor is the main widget for rendering an AppFlowy Editor instance. It provides a complete rich text editing experience with customizable block components, keyboard shortcuts, and styling options.
Constructor
Parameters
The editor state that manages the document and selection.
Defines how each block type is rendered. Pass
standardBlockComponentBuilderMap to extend with custom blocks:Character-based keyboard shortcuts (e.g., Markdown shortcuts like
** for bold).Command-based keyboard shortcuts (e.g., Cmd+B for bold).
Custom context menu shown on right-click.
Configuration for content insertion from external sources.
Whether the editor allows editing. When false, transactions are ignored but keyboard navigation still works.
Automatically focus the editor on mount.
Initial selection when
autoFocus is enabled.Size the editor to its content height. Requires wrapping with a sized widget and providing a scroll controller.
Show the text magnifier on iOS/Android.
Custom scroll controller for the editor.
Visual styling for the editor including colors, padding, and typography.
Widget displayed above the editor content.
Widget displayed below the editor content.
Custom focus node for controlling keyboard focus.
Enable auto-complete functionality. Requires providing
autoCompleteTextProvider.Provider for auto-complete suggestions.
Styling for drag-and-drop target indicators (desktop only).
Disable selection gestures and context menu.
Disable all keyboard shortcuts and text input.
Disable the auto-scroll feature.
Disable auto-scrolling behavior.
Distance from editor edge to trigger auto-scroll (mobile).
Rules applied to document transactions (e.g., ensuring at least one block).
Wrapper widget for customizing block component rendering.
Example
See Also
- EditorState - Managing document state
- Document - Document structure
- Transaction - Applying changes