How masaakis/sumark works
SuMark is a Tauri desktop WYSIWYG Markdown editor. The main workflow is opening or creating a document, editing rich text with live Markdown conversion, then saving Markdown or exporting a PDF. The graph preserves major editing capabilities and the cross-platform webview runtime. Feature responsibilities and workflow links are based on the README; source excerpts do not show frontend module wiring, so those links are documented relationships rather than claims about specific calls.
Main entry points: main.js App Entry · main.rs Tauri Backend · autoConvert.js Auto Conversion · keyboard.js Keyboard Controls
Components 20
Editing
- App Entry
src/main.js - Auto Conversion
src/modules/autoConvert.js - Keyboard Controls
src/modules/keyboard.js - Toolbar Actions
src/modules/toolbarActions.js - Undo Redo
src/modules/undoRedo.js - Markdown Conversion
src/modules/markdown.js
Documents
- File Operations
src/modules/fileManager.js - Document Tabs
src/modules/tabManager.js - PDF Export
src/modules/exportManager.js - Paste Handling
src/modules/pasteUtils.js
Rich Content
- Image Tools
src/modules/imageManager.js - Table Editing
src/modules/tableManager.js - Code Highlighting
src/modules/codeHighlight.js - Math Rendering
src/modules/mathRender.js - Mermaid Rendering
src/modules/mermaidManager.js - TOC Generation
src/modules/tocManager.js - Toggle Blocks
src/modules/toggleBlock.js
Desktop Runtime
- Tauri Backend
src-tauri/src/main.rs - Platform Webviews
src-tauri/patches/wry-0.24.11/src/webview
Other components
- Editor
Connections 19
- Editor → App Entry: uses
README.md - App Entry → File Operations: opens and saves
README.md - App Entry → Document Tabs: manages documents
README.md - App Entry → Auto Conversion: supports live editing
README.md - App Entry → Keyboard Controls: handles shortcuts
README.md - App Entry → Toolbar Actions: offers editing actions
README.md - App Entry → Undo Redo: supports undo redo
README.md - App Entry → Markdown Conversion: converts documents
README.md - App Entry → PDF Export: exports PDF
README.md - App Entry → Paste Handling: supports rich paste
README.md - App Entry → Image Tools: supports image editing
README.md - App Entry → Table Editing: supports table editing
README.md - App Entry → Code Highlighting: highlights code
README.md - App Entry → Math Rendering: renders equations
README.md - App Entry → Mermaid Rendering: renders diagrams
README.md - App Entry → TOC Generation: generates contents
README.md - App Entry → Toggle Blocks: supports collapsible blocks
README.md - App Entry → Tauri Backend: runs as desktop app
README.md - Tauri Backend → Platform Webviews: uses patched runtime