components/u_rich_text_editor library
Classes
- UEditorBlock
- One block in the editor document.
- UEditorDialogs
- Dialogs used by both editors.
-
UEditorDropdown<
T> - A compact bordered dropdown used for the block-type and font pickers.
-
UEditorMenuEntry<
T> - One entry of a UEditorDropdown.
- UEditorStyles
- Shared visual styling for editor blocks (used by the editors and UHtmlView).
- UEditorToolButton
- Toolbar widgets and dialogs shared by URichTextEditor and Toolbar widgets and dialogs used by URichTextEditor. Nothing here holds editor state — every helper takes what it needs and returns a plain result. A single square toolbar button with an active/selected state.
- UEditorToolSeparator
- A thin vertical rule between toolbar groups.
- UFindReplaceRequest
- The result of the find & replace dialog.
- UHtmlDocument
- Serializes editor blocks to clean semantic HTML and parses HTML back into blocks. Pure Dart, no external dependencies.
- URichTextController
- A TextEditingController that keeps a list of UStyleSpans in sync with text edits and renders them via buildTextSpan. It survives insertions/deletions by shifting spans and exposes helpers to toggle/apply formatting on the current selection.
- URichTextEditor
- Embeddable block-based rich text editor.
- URichTextEditorField
- UStyleSpan
-
A single inline style span over the range [start, end) of a text block.
value carries the payload for value-attributes:
int(ARGB) for UInlineAttr.color and UInlineAttr.highlight,doublefor UInlineAttr.fontSize, andStringfor UInlineAttr.fontFamily (family name) and UInlineAttr.link (href). It is null for boolean attributes. - UTableData
- The cells of a UBlockType.table block. Cells hold plain text.
Enums
- UBlockType
- Block level types the editor supports. All values except UBlockType.image, UBlockType.divider and UBlockType.table are text blocks that own a URichTextController.
- UInlineAttr
- A self-contained, cross-platform rich text editor that produces and consumes HTML. No third-party editor packages are used.
Constants
-
uBooleanInlineAttrs
→ const List<
UInlineAttr> - The attributes that behave as on/off toggles (no payload).
Typedefs
-
URichImageUploader
= Future<
String?> Function(FileData file) -
Signature for uploading a picked image and returning its final URL (or null
on failure). Provide your own to plug in any backend; when omitted the
editor uploads through
UServices.media.