Markdown Input <el-dm-markdown-input>

Markdown editor with syntax-highlighted write mode, preview, file upload, autocomplete, and word count.

Basic Editor

A markdown editor with syntax-highlighted write mode and rendered preview mode. Switch between tabs using the toolbar.

With Initial Value

Word Limit

The status bar shows a soft word cap warning when approaching the limit.

Dark Mode

The dark attribute switches Prism.js syntax highlighting to a dark theme.

Rich Preview (Math, Code, GFM, Mermaid)

Switch to the Preview tab to see rendered markdown with KaTeX math, syntax-highlighted code blocks, GFM tables, task lists, and mermaid diagrams.

Disabled

Autocomplete (@mentions & #references)

Type @ to trigger mention suggestions, or # for reference suggestions. The element fires mention-query / reference-query events — call resolve(suggestions) to populate the dropdown.

Form Integration

el-dm-markdown-input is a form-associated element — its value is included in FormData automatically.

Change Events

The element fires a change event with detail.value on every edit.

Change events will appear here...