flutter_quill_kit 0.2.0
flutter_quill_kit: ^0.2.0 copied to clipboard
A modular rich text editor for Flutter built on the Quill Delta format — a lean core with opt-in add-ons, a declarative toolbar, and a stateless viewer.
Changelog #
0.2.0 #
Fixed #
- The widget
readOnlyflag no longer lets keyboard shortcuts edit the document.QuillKitEditor(readOnly: true)over a controller whose ownreadOnlywas false still applied Ctrl/Cmd+B, the header and indent shortcuts, and undo/redo — silently mutating a document the app had declared read-only. The shortcut actions now consult the same combined predicate as the caret, IME and text actions. - Async continuations no longer touch a disposed controller. Paste and the
link/colour dialogs resume after an
await; if the editor was disposed in the meantime the document's closed change stream threw aStateErrorin release builds. AddedQuillKitController.isDisposed. controller.changessurvives a document swap. It returned the current document's stream anddocument =closed the old one, so an autosave subscription silently stopped firing after loading another document.- A controller swap no longer leaves the context menu and selection handles bound to the previous controller.
QuillKitViewernow appliestheme.horizontalPadding, matching the editor as its documentation claimed.DropdownAttributeItemno longer throws on an emptyoptionslist.- The editor no longer issues a
TextInput.showplatform call on every controller notification, which also re-summoned a keyboard the user had dismissed.
Accessibility #
- Checklist checkboxes are now real checkboxes to assistive tech. They
were a 16px
GestureDetectorwith no semantics at all: a screen-reader user could not tell a checklist item from a bullet, could not know whether it was checked, and could not toggle it. - The editor now exposes text-field semantics (
textField,multiline,readOnly,focused, label, and the placeholder as a hint). Previously screen readers announced the content as a stack of static text and never said it was editable. - Colour swatches are labelled, selectable buttons instead of ~50 identical unlabelled targets.
- Decorative bullet glyphs and code-block gutter numbers are excluded from the semantics tree; ordered-list rows merge their ordinal with the item text. Checklist rows stay separately actionable.
- The caret holds solid instead of blinking forever when the platform requests reduced motion, and stops its timer.
- The header dropdown is named for the control ("Paragraph style") rather than for whichever option happens to be selected.
- The colour picker's hex field reports a real, localizable error instead of
announcing the literal string
#rrggbb. - New localizable strings:
editor,checklistItem,paragraphStyle,invalidHex.
Changed — layout #
- Interactive controls now meet the 48x48 minimum tap target. Flutter
clips hit testing to a render box's bounds, so this necessarily changes
layout: buttons still paint 40x40, but a toolbar row is 48px tall
instead of 40, the colour palette wraps to fewer swatches per row, and an
editable checklist row is 48px tall and indents 48px instead of 32. A
read-only checklist and the viewer are unaffected. Nothing paints
differently — only spacing. Adjust
MinimumTapTarget.minSizeat a call site if you need the old density. - The blockquote rule uses
BorderDirectional, so it mirrors to the right in RTL documents instead of always sitting on the left.
Added #
QuillKitEditor.onOpenSearch. Ctrl/Cmd+F was bound to a no-op action that reported the key as handled, so a host app's own find shortcut died whenever the editor had focus. With no callback the binding is omitted entirely and the key propagates.==/hashCodeonQuillKitStrings(an inherited-widget payload that previously forced every toolbar item to rebuild on any ancestor rebuild), and==/hashCode/copyWithonEditorBehaviorandEditorAppearance. Changingbehaviorat runtime now re-issues the IME configuration.
Changed #
editor.dartandtoolbar.dartnow export the types their own signatures expose. Neither was usable standalone:toolbar.dartcould not nameQuillKitController, the required type ofQuillKitToolbar.controller, andeditor.dartcould not nameDocumentorAttribute.updateSelection'sChangeSourceargument is now honoured instead of ignored: only a local selection change clears the pending style, so a remote or history-driven caret move no longer cancels a pending format.- Removed the unused
flutter_localizationsdependency, which pulledintlinto every consumer for nothing.
0.1.0 #
Initial release.
- Delta-compatible, pure-Dart document model: attribute registry, node tree, undo/redo history, edit rules, search, plain-text extraction; unknown attributes and embeds survive load/save round-trips.
QuillKitController: selection, insert/format/indent commands, toggle semantics with pending styles, history grouping, per-instanceEditorScopeservices (clipboard, link launcher) — no global state.QuillKitEditor: IME input, keyboard shortcuts, markdown-style typing autoformat, URL auto-linking, selection handles and context menu, placeholder text, read-only mode with tappable checklists.QuillKitViewer: a genuinely stateless, controller-free read-only renderer with optional selection, link taps, and checkbox taps.EditorExtensionAPI — every built-in format ships as an extension, withbasic(),standard(), andfull()presets; custom attributes, edit rules, embed renderers, toolbar items, and shortcuts register per instance.- Declarative
QuillKitToolbardriven by extension-contributed items (or an explicititems:list), wrap and scroll layouts, group dividers. - Theming via
QuillKitTheme/QuillKitThemeData: partial themes merge over defaults derived from the ambient Material theme; the editor and viewer share one style-resolution path. - Focused entrypoints:
document.dart(server-safe model),editor.dart,toolbar.dart, plus the all-influtter_quill_kit.dart. - Correct tri-state text direction with separate LTR and RTL toggles.
- Localizable toolbar strings (
QuillKitStrings/QuillKitStringsScope).