Style HTML Viewer

by Robin Tan
5
4
3
2
1
New Plugin

Description

Renders HTML documents natively in Obsidian workspace tabs with local CSS, image, and script asset resolution, CSP security, and link interception. - This plugin has not been manually reviewed by Obsidian staff.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
0
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Style HTML Viewer

An Obsidian plugin that enables rendering of .html files directly within Obsidian workspace tabs.

Features

  • Workspace View Integration: Open HTML files inside a dedicated custom view tab.
  • Preview & Source Editor: Toggle between a sandboxed rendered preview and raw HTML source code.
  • DOM Relative Asset Resolution: Automatically parses HTML and converts relative resources (css, js, images, audio, video) to valid local Obsidian vault URIs using vault.getResourcePath.
  • IPC Link Interception: Intercepts links to local .md or .html files and opens them in native Obsidian workspace tabs. External web links (http(s)) are opened in the default browser.
  • Security Sandboxing & CSP: Executes pages inside an <iframe> with strict sandbox flags and enforces a strict, local-only Content Security Policy (CSP).
  • Live Reloading: Automatically re-renders the preview when the HTML file or any of its CSS/JS dependencies in the vault are modified.

Development

Setup and Commands

  1. Install dependencies:

    npm install
    
  2. Development compiler (with source mapping and file watching):

    npm run dev
    
  3. Production build:

    npm run build
    
  4. Run test suite:

    npm test
    

Developer Playbooks & References

For agent instructions, rules, and detailed technical specifications, see: