Skip to content

feat: raw HTML block support#260

Draft
ocavue wants to merge 9 commits into
masterfrom
html-block
Draft

feat: raw HTML block support#260
ocavue wants to merge 9 commits into
masterfrom
html-block

Conversation

@ocavue

@ocavue ocavue commented Jul 7, 2026

Copy link
Copy Markdown
Member

Adds a dedicated htmlBlock node so raw HTML in Markdown (elements, comments, processing instructions) round-trips byte-exact and no longer has its inner Markdown mis-parsed. Element blocks render a DOMPurify-sanitized live preview stacked above the editable source (the caret reveals the source, like the math block); comments and other non-visual blocks stay source-only, and renderHTMLPreview={false} shows every block as source. This replaces the old invisible htmlComment node (breaking).

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meowdown Ready Ready Preview, Comment Jul 7, 2026 6:35pm

@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/prosekit/meowdown/@meowdown/core@260
npm i https://pkg.pr.new/prosekit/meowdown/@meowdown/react@260

commit: 7830036

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 94.05% 3464 / 3683
🔵 Statements 91.72% 3858 / 4206
🔵 Functions 91.82% 831 / 905
🔵 Branches 85.61% 2310 / 2698
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/index.ts 0% 0% 0% 0%
packages/core/src/style.css 0% 0% 0% 0%
packages/core/src/converters/md-to-pm.ts 98.22% 86.12% 100% 99.2% 147-149, 193, 256, 267
packages/core/src/converters/pm-to-md.ts 96.25% 90.76% 100% 98.23% 49, 116, 251-252, 270-271, 290, 461, 478
packages/core/src/extensions/code-block-highlight.ts 87.03% 75% 100% 93.18% 27, 44-46, 120, 123, 124
packages/core/src/extensions/extension.ts 100% 100% 100% 100%
packages/core/src/extensions/html-block.ts 91.22% 80% 100% 97.77% 124, 127, 131, 139, 153
packages/core/src/extensions/node-names.ts 100% 100% 100% 100%
packages/react/src/components/editor.tsx 80.95% 70.58% 77.77% 80.95% 327, 357-363
packages/react/src/components/html-block-render.tsx 91.66% 33.33% 100% 100% 33
packages/react/src/components/html-block-view.module.css 0% 0% 0% 0%
packages/react/src/components/html-block-view.module.d.css.ts 0% 0% 0% 0%
packages/react/src/components/html-block-view.tsx 96% 88.23% 100% 100% 39
packages/react/src/components/markdown-view.tsx 93.86% 80% 93.33% 98.63% 127, 131, 177, 211, 213, 268, 282, 393, 403, 450
packages/react/src/components/prosekit-editor.tsx 95.58% 90.38% 91.3% 96.72% 276, 321-324
packages/react/src/extensions/html-block-view.tsx 100% 100% 100% 100%
packages/react/src/utils/sanitize-html.ts 100% 100% 100% 100%
Generated in workflow #1101 for commit 7830036 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant