block_editor 0.0.2-dev.1
block_editor: ^0.0.2-dev.1 copied to clipboard
A Notion-inspired, block-based rich text editor for Flutter. Built from scratch with a plugin system, inline embeds, variables, tags, and export to JSON, Markdown, and HTML.
Changelog #
All notable changes to the block_editor package are documented here.
The format follows Keep a Changelog. This package adheres to Semantic Versioning.
0.0.2-dev.1 — 2026-03-20 #
First published pre-release. Covers Phase 1 (Document Model), Phase 2 (Rendering Engine), and Phase 3 (Block Plugin System). API is unstable — breaking changes are expected in future pre-release versions before 1.0.0.
Added #
Document Model (Phase 1)
BlockNode— typed content node withid,type,attributes, andchildrenBlockDocument— root container with orderedBlockNodelist, JSON serialisation and deserialisationTextDelta— inline rich text model as a list ofDeltaOpobjectsDeltaOpsealed class withTextOpsubtype carryingInlineAttributesInlineAttributes— bold, italic, underline, strikethrough, inline code, link, text color, background colorBlockController— document state manager with insert, delete, update, move, and transform operationsBlockTypes— typed constants for all built-in block type identifiersEditorSelection— sealed class replacingBlockSelectionfor cursor and range selection- Undo/redo stack with snapshot-based history
selectionStreamonBlockControlleralongside the document change stream
Rendering Engine (Phase 2)
BlockRenderer— stateless widget mappingBlockNodeto its Flutter widget viaBlockRegistryBlockEditorWidget— root editor widget with externalBlockControllerownership, keyboard events, focus, and scrollRichTextRenderer— convertsTextDeltainto aTextSpantree- Block widgets for Paragraph, H1, H2, H3, BulletList, NumberedList, Todo, Quote, and Divider
- Cursor rendering with public animation API
- Single-block and cross-block selection highlight
- Character-level editing operations in pure Dart
- Drag and drop block reordering with ghost preview and drop indicator
readOnlyflag onBlockEditorWidgetBlockEventsealed class as the universal block interaction contractCustomBlockEventwrapper subtype for external package event extensibility
Block Plugin System (Phase 3)
BlockPluginabstract interface —blockType,build(),serialize(),deserialize(), optionaltoolbarButton(),slashCommandItem(),slashCommandGroup()BlockRegistrywith publicregister(BlockPlugin)method — built-in blocks pre-registered internally- Per-block stream system via
BlockController.streamForBlock(String blockId) EditorEditingOperationsextended to operate onTextDelta.opspreserving inline formatting- IME and mobile soft keyboard input via
TextInputConnection - Built-in media block plugins: Image, Video, YouTube embed, File attachment, Code, Callout, Link
- Inline embed
DeltaOpsubtypes for variables and tags
0.0.1 — 2026-01-01 #
Initial mono-repo scaffold. No functional code. Repository structure, CI pipeline, Melos workspace configuration, and pubspec files only.