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:
Buns Enchantress
2026-02-03 04:46:28 -06:00
parent 5d1225be6c
commit 3e4b124ec7
2 changed files with 1289 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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;
})