mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-15 20:10:42 +00:00
feat: add create-markdown-preview.js for markdown rendering
- Introduced a new script for framework-agnostic HTML rendering of markdown content. - The script includes various parsing functions to handle different markdown elements. - Updated the chat widget to load the vendored version of @create-markdown/preview for improved markdown rendering.
This commit is contained in:
1287
docs/assets/create-markdown-preview.js
Normal file
1287
docs/assets/create-markdown-preview.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,9 +3,9 @@
|
||||
|
||||
const apiBase = window.DOCS_CHAT_API_URL || "http://localhost:3001";
|
||||
|
||||
// Load @create-markdown/preview for markdown rendering
|
||||
// Load vendored @create-markdown/preview@0.1.0 for markdown rendering
|
||||
let markdownToHTML = null;
|
||||
import("https://esm.sh/@create-markdown/preview@0.1.0")
|
||||
import("/assets/create-markdown-preview.js")
|
||||
.then((mod) => {
|
||||
markdownToHTML = mod.markdownToHTML;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user