x1han553 downloadsOpen local HTML study pages in Obsidian with native browser rendering for CSS, MathML, SVG diagrams, and visual notes.
HTML Canvas is an Obsidian plugin for opening local .html and .htm files as visual notes inside your vault.
It is designed for study pages, exported notes, formula-heavy documents, and diagram-rich HTML. The default mode loads trusted vault HTML through Obsidian's native browser iframe path instead of rewriting the document into srcdoc, so browser-native features such as CSS layout, MathML formulas, inline SVG diagrams, anchors, and responsive pages keep their original behavior more reliably.
.html and .htm files directly from the Obsidian file explorer.allow-scripts.HTML Canvas is especially useful when you generate HTML from Markdown, notebooks, papers, or learning notes and want to read the result inside Obsidian without losing visual fidelity.
Examples:
After the plugin is accepted into the community directory:
HTML Canvas.main.js, manifest.json, and versions.json from the latest GitHub release..obsidian/plugins/html-canvas/.HTML Canvas in Community plugins..html or .htm file anywhere in your vault.The default operating mode is Native File Mode, which is intended for HTML files you trust and created or saved locally.
HTML Canvas keeps several operating modes so you can choose between fidelity and restriction.
| Mode | Intended use | Rendering behavior |
|---|---|---|
| Native File Mode | Trusted local visual notes | Loads the vault file directly in an iframe for browser-native rendering; scripts are not allowed by default sandboxing. |
| Balance Mode | General HTML reading | Parses and sanitizes HTML, removes scripts, and applies compatibility patches. |
| High Restricted Mode | Less trusted files | Stronger sanitization and stricter content restrictions. |
| Text Mode | Untrusted files | Keeps text-oriented content and removes most visual or interactive features. |
| Low Restricted Mode | Troubleshooting trusted files | Less sanitization, but scripts are still removed. |
| Unrestricted Mode | Last-resort troubleshooting only | Leaves the document mostly untouched. Use carefully. |
Many HTML reading plugins transform the document before showing it. That is useful for security, but it can break complex learning pages: SVG can be clipped, MathML can be degraded, CSS layout can change, and anchor behavior can differ from a normal browser.
HTML Canvas's default Native File Mode avoids that rewrite path. It points the iframe at the actual vault resource URL, so Chromium's built-in HTML, CSS, SVG, and MathML engines do the rendering directly. This is the key reason it works well for generated educational pages and visual notes.
HTML Canvas is meant for local files you understand. The default Native File Mode uses iframe sandboxing without allow-scripts, so scripts in the opened HTML are not allowed to execute by default. For files from unknown sources, switch to Text Mode or High Restricted Mode.
Do not use Unrestricted Mode for arbitrary downloaded HTML.
Install dependencies:
npm install
Build production main.js:
npm run build
Run the current TypeScript audit:
npm run typecheck
The inherited codebase still has loose DOM and third-party module types, so typecheck is currently an audit command rather than a release gate.
A GitHub release should include:
manifest.jsonmain.jsversions.jsonThe release tag should match the version in manifest.json.
HTML Canvas is derived from the MIT-licensed Obsidian HTML Reader plugin by Nuthrash. This version has been renamed and adapted around native local HTML rendering for visual learning notes.