Options, toolbar features, public API and architecture — everything in one place.
Passed to ME.init(opts) / the options prop (Vue & React).
| Option | Type | Default | Description |
|---|---|---|---|
mount | string | '#app' | CSS selector of the mount element (JS version) |
title | string | 'ME.js Editor' | Title shown in the top nav |
placeholder | string | 'Start writing...' | Empty-state hint |
iconsMode | string | 'remote' | Google Material Icons from web, or 'local' stylesheet |
importFromContent | boolean | true | Import the mount element's inner content as the initial document (JS version) |
uploadUrl | string | null | Paste-image upload endpoint; falls back to base64 when unset or unreachable |
pasteImage | string | 'auto' | 'auto' | 'base64' | 'upload' |
showViewCode | boolean | true | Toolbar View-Markdown button |
showCopy | boolean | true | Toolbar Copy-Markdown button |
showAudio | boolean | true | Toolbar Audio insert button |
showVideo | boolean | true | Toolbar Video insert button |
showStatusBar | boolean | true | Bottom character-count bar |
maxLength | number | 0 | Character cap; count turns red when exceeded (0 = unlimited) |
Select text and click an icon — formatting applies instantly.
Bold (Ctrl+B) · Italic (Ctrl+I) · Strikethrough · Inline code · Text color
H1 / H2 / H3 · Normal text · Blockquote · Bullet / numbered / task lists · Code block · Table (rows/columns dialog) · Horizontal rule
Link · Image (title + URL dialog) · Audio · Video · Paste images from clipboard
Eraser (clears all formatting of selection) · Undo / Redo · View Markdown source · Copy Markdown to clipboard
All access goes through ME.instance (returned by ME.init()). Vue exposes the same methods via template ref; React via ref.
ME.instance.getMarkdown() // pure Markdown ME.instance.getHTML() // rendered HTML ME.instance.getRawHTML() // raw editor DOM HTML ME.instance.export() // { markdown, html, mixed } ME.instance.exportMixed() // MD + HTML blocks for tables/code ME.instance.download('doc', 'md') // 'md' | 'html' | 'mixed' ME.instance.setMarkdown('# ...') // import Markdown string ME.instance.importFromElement('#src') // import from any element ME.instance.clear() // core modules (all three versions export these) ME.MdParser.parse('# markdown') // -> HTML ME.MdSerializer.serialize(domNode) // -> Markdown
Three independent modules — the parsing and serialization layers are identical across all three framework versions.
Markdown source <-> MdParser <-> WYSIWYG DOM <-> MdSerializer <-> Markdown storage
|
Editor (toolbar, API)
┌──────────────┬──────────────────────────────────────────────┐
│ me-editor.js │ vanilla JS — ME.init(), works anywhere │
│ me-vue.js │ Vue 3 — <me-editor v-model="content" /> │
│ me-react.js │ React 18 — <MeEditor value onChange /> │
└──────────────┴──────────────────────────────────────────────┘
Set uploadUrl and pasted images upload to your backend; the response { "url": "..." } becomes the inserted image source. Without it, images fall back to base64.
# minimal Python receiver (server.py ships in the repo)
# python server.py -> POST /upload on port 1688
# multipart/form-data field "file" -> { "url": "/uploads/xxx.png" }