novel_editor 0.3.1
novel_editor: ^0.3.1 copied to clipboard
Novel for Flutter — a Notion-style rich text editor with AI writing assistant, slash commands, floating toolbar, and markdown import/export. Drop-in WYSIWYG editor widget with OpenAI, Gemini, and Anth [...]
lifeos_editor #
A market-ready rich text editor for Flutter. One widget. Full WYSIWYG editing.
Built on appflowy_editor with opinionated defaults, Notion-style UI, and a dead-simple API.
Features #
- WYSIWYG — Bold text looks bold. Headings are large. Code has backgrounds.
- Slash commands — Type
/for headings, lists, quotes, code blocks, dividers - Floating toolbar — Select text to bold, italic, underline, strikethrough, code
- Keyboard shortcuts — Cmd+B, Cmd+I, Cmd+U, Cmd+Z, Cmd+Shift+Z
- Markdown — Content in as markdown, content out as markdown
- Dark & light themes — Beautiful defaults that match Notion/Novel
- One widget — Drop in and go
Installation #
dependencies:
lifeos_editor: ^0.1.0
Usage #
import 'package:lifeos_editor/lifeos_editor.dart';
LifeOSEditor(
initialContent: '# Hello\nThis is **bold** text.',
onChanged: (markdown) => save(markdown),
)
That's it. You get WYSIWYG editing, slash commands, floating toolbar, keyboard shortcuts, and markdown serialization.
Options #
LifeOSEditor(
initialContent: markdownString, // Markdown to load
onChanged: (md) {}, // Called on every change
editable: true, // Toggle read-only
darkMode: true, // Force dark/light (auto-detects if null)
floatingToolbar: true, // Show toolbar on selection
slashMenu: true, // Enable / commands
contentPadding: 24, // Horizontal padding
autofocus: false, // Auto-focus on mount
)
Programmatic Access #
final editorKey = GlobalKey<LifeOSEditorState>();
LifeOSEditor(key: editorKey, ...)
// Get markdown
String md = editorKey.currentState!.toMarkdown();
// Replace content
editorKey.currentState!.setContent('# New content');
// Access underlying EditorState
EditorState state = editorKey.currentState!.editorState;
Theming #
Themes are built-in. Auto-detects dark/light from your app theme, or force it:
LifeOSEditor(darkMode: true) // Always dark
LifeOSEditor(darkMode: false) // Always light
LifeOSEditor() // Auto-detect
Slash Commands #
Type / to see:
| Command | Block type |
|---|---|
| Heading 1-3 | # ## ### |
| Bullet List | - item |
| Numbered List | 1. item |
| To-do List | - [ ] item |
| Quote | > text |
| Divider | --- |
Why lifeos_editor? #
| lifeos_editor | Raw appflowy_editor | |
|---|---|---|
| Setup | 1 widget, 1 import | 50+ lines of config |
| Themes | Built-in dark/light | Manual styling |
| Slash menu | Pre-configured | Build your own |
| Toolbar | Included | Build your own |
| API | Markdown in/out | Document model |
| Time to working editor | 30 seconds | 30 minutes |
License #
MIT