How kenforthewin/atomic-editor works
Atomic Editor is a React/CodeMirror 6 Markdown writing surface: users edit plain Markdown while decorations render a live, layout-stable view, and the Markdown remains the source of truth. Its main workflow runs through the React editor into CodeMirror, where preview, tables, images, and optional wiki links provide editing and reading features; callbacks and the imperative handle expose results and controls. The README also documents search/reveal, syntax highlighting, smart-list editing, theming, and read-only mode. Some feature wiring is inferred from imports or documentation, not fully sampled.
Main entry points: AtomicCodeMirrorEditor.tsx React editor · tree-progress.ts Parser progress · wiki-links.ts Wiki links · inline-preview.ts Inline preview
Components 15
Editor runtime
- React editor
src/AtomicCodeMirrorEditor.tsx - CodeMirror view
Markdown rendering
- Inline preview
src/inline-preview.ts - Markdown syntax
src/highlight.ts - Table widgets
src/table-widget.ts - Image blocks
src/image-blocks.ts - Parser progress
src/tree-progress.ts
Editing features
- Wiki links
src/wiki-links.ts - Smart editing
src/edit-helpers.ts - Code languages
src/code-languages.ts
Reading and presentation
- Read-only mode
src/read-only.ts - Search and reveal
src/AtomicCodeMirrorEditor.tsx - Editor theme
src/atomic-theme.ts
Other components
- Markdown author
- Link resolver
Connections 20
- Markdown author → React editor: edits Markdown
README.md - React editor → CodeMirror view: creates view
src/AtomicCodeMirrorEditor.tsx - React editor → Inline preview: configures preview
src/AtomicCodeMirrorEditor.tsx - React editor → Table widgets: configures tables
src/AtomicCodeMirrorEditor.tsx - React editor → Image blocks: configures images
src/AtomicCodeMirrorEditor.tsx - React editor → Wiki links: composes extension
- React editor → Smart editing: adds key handlers
src/AtomicCodeMirrorEditor.tsx - React editor → Read-only mode: reconfigures mode
src/AtomicCodeMirrorEditor.tsx - React editor → Search and reveal: provides controls
src/AtomicCodeMirrorEditor.tsx - React editor → Editor theme: applies theme
src/AtomicCodeMirrorEditor.tsx - React editor → Code languages: accepts language list
README.md - Inline preview → Markdown syntax: uses delimiters
- Table widgets → Markdown syntax: parses highlights
src/table-widget.ts - Parser progress → Inline preview: signals parse growth
src/tree-progress.ts - Parser progress → Table widgets: signals parse growth
src/tree-progress.ts - Parser progress → Image blocks: signals parse growth
src/tree-progress.ts - Wiki links → Link resolver: resolves targets
README.md - Wiki links → Markdown author: opens links
README.md - React editor → Markdown author: returns Markdown
README.md - React editor → Markdown author: exposes imperative controls
README.md