Skip to content

✨ feat(playground): add HTML preview tab to playground#1815

Merged
harehare merged 5 commits into
mainfrom
feat/playground-preview-tab
Jun 8, 2026
Merged

✨ feat(playground): add HTML preview tab to playground#1815
harehare merged 5 commits into
mainfrom
feat/playground-preview-tab

Conversation

@harehare

@harehare harehare commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Add a "Preview" tab that renders mq output as HTML in a sandboxed iframe, allowing users to see a live preview of the processed markdown.

  • Export toHtml and htmlToMarkdown from mq-web
  • Render preview with theme-aware styling (dark/light mode)
  • Use local mq-web package for development

harehare added 3 commits June 7, 2026 22:42
Add a "Preview" tab that renders mq output as HTML in a sandboxed
iframe, allowing users to see a live preview of the processed markdown.

- Export `toHtml` and `htmlToMarkdown` from mq-web
- Render preview with theme-aware styling (dark/light mode)
- Use local mq-web package for development
- Remove allow-same-origin from sandbox to isolate srcdoc as null origin,
  preventing access to parent localStorage and cookies
- Add Content-Security-Policy meta tag (default-src none, style-src unsafe-inline,
  img-src data: blob:) to block external resource loading
@harehare harehare force-pushed the feat/playground-preview-tab branch from 1b9db86 to 9d2d516 Compare June 7, 2026 14:01
@harehare harehare marked this pull request as ready for review June 7, 2026 14:04
@harehare harehare merged commit 43a56f2 into main Jun 8, 2026
8 checks passed
@harehare harehare deleted the feat/playground-preview-tab branch June 8, 2026 14:06
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