Markdown Editor Languages
Every code language CodeMirror knows, for MarkdownEditor's fenced code blocks; each language loads the first time a block names it. Opt-in, since the list adds about 230 KB of shared chunks to most bundles.
Example
Text styleBoldItalicStrikethroughInline codeLinkQuoteBulleted listNumbered listTask list
Markdown. Formatting marks stay hidden until the caret is inside formatted text. Type / for blocks. Press Escape, then Tab, to leave the editor.
markdown-editor-languages-demo.tsxCopy code
Installation
Copy code
Brings alongmarkdown-editor
npm packages
@codemirror/language-data@6.5.2Usage
ImportCopy code
Opt in when people write fenced code: the languages load lazily, per fence.
API reference
This item exports functions and types rather than components.
Other exports
markdownCodeLanguagesAgent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.