stackedit.js is a lightweight JavaScript library for embedding the StackEdit Markdown editor into an existing website. It opens the full editor inside an iframe instead of bundling the editor code directly into the host page. Developers can bind it to a textarea, pass a filename and Markdown content, and receive updates through events. The fileChange event returns both the edited Markdown and sanitized HTML, while the close event reports when the iframe is dismissed. Silent mode can convert Markdown to HTML without showing the editing interface. File properties can configure the Markdown engine, including a CommonMark preset. The library has no runtime dependency, supports npm or script-tag installation, and can target a custom self-hosted StackEdit URL.
Features
- Embeddable StackEdit Markdown editor
- Lightweight iframe-based integration
- Textarea content synchronization
- Markdown-to-sanitized-HTML conversion
- File change and close events
- Custom StackEdit server support