Drive the editor with your own UI via its public API. The toolbar is just optional sugar — the same actions work from any button, keyboard shortcut, or programmatic call.
undo(), removeHR(), setMode(), etc.) does all the work.
Custom toolbar styled by the app — editor initialized with showToolbar: false
Same editor, stock toolbar — showToolbar: true + feature flags
| Method | Description |
|---|---|
setMarkdown(md) | Replace current content (async) |
getMarkdown() | Get current markdown source |
getHTML() | Get rendered HTML |
setMode(mode) | Switch to 'source' | 'split' | 'preview' |
setTheme(theme) | Runtime theme: 'light' | 'dark' | 'auto' |
undo() / redo() | Step through edit history |
canUndo() / canRedo() | Check if undo/redo is available |
clearHistory() | Clear undo/redo stacks |
removeHR() | Strip all --- (fence-safe, table-safe) |
convertLazyLinefeeds() | Single \n → paragraph breaks (idempotent) |
copy('markdown' | 'html') | Copy to clipboard |
copyRendered() | Copy rendered rich text |
destroy() | Clean up the editor |
QuikdownEditor.removeHRFromMarkdown(md) | Static: strip HRs from a string |
QuikdownEditor.convertLazyLinefeeds(md) | Static: fix lazy linefeeds in a string |