Variable: markdownPaste
ts
const markdownPaste: (options?) => Extension;Format Markdown pasted as plain text (from a chat, a terminal, a .md file). Pastes that carry HTML are left to the normal HTML handling, and paste-as-plain-text (Shift+Mod+V) is never formatted.
The parser (marked, ~19 KB gzip) is not part of your main bundle: it loads in the background on the editor's first focus. A paste before it has loaded goes in as plain text.
Parameters
| Parameter | Type |
|---|---|
options? | MarkdownPasteOptions |
Returns
Example
ts
import { markdownPaste } from '@writeon/markdown/paste'
createEditor({ extensions: [...basic(), markdownPaste()], label: 'Text' })