You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,6 @@ A demo page (`test/fixture.html`) demonstrates all the passing HTML features.
17
17
18
18
## Installation
19
19
20
-
> Note: Obsidian only shows `.md` files in your file explorer, by default. To see your `.html` files too, be sure to enable: **Settings → Files & links → Show all file types**
21
-
22
20
### Install from Obsidian directly
23
21
24
22
* Go to Obsidian Community Plugins: [community.obsidian.md/plugins/html-docs](https://community.obsidian.md/plugins/html-docs)
@@ -55,10 +53,40 @@ npm run release:check
55
53
56
54
See `test/fixture.html` for the full list of features exercised — and the inline notes for what is intentionally blocked.
57
55
58
-
## Obsidian Official Resources
56
+
## Usage
57
+
58
+
After installing the plugin, you can open `.html` files in Obsidian tabs (like a doc), embedded files, and canvas cards.
59
+
60
+
Obsidian shows `.md` files in the file explorer by default. To see `.html` files too, enable **Settings → Files & links → Show all file types**.
61
+
62
+
Link to HTML docs with the explicit `.html` extension:
63
+
64
+
```markdown
65
+
See: [[my-doc.html]]
66
+
```
67
+
68
+
Embed HTML docs like other Obsidian embeds. Embeds default to about 600px tall; adjust size with [Obsidian's embed syntax](https://obsidian.md/help/embeds):
This HTML Docs plugin prioritizes a simple security boundary: HTML runs in a sandboxed iframe with JavaScript allowed, but without same-origin access to Obsidian or the vault.
82
+
83
+
That keeps HTML documents isolated from your notes and Obsidian internals, with the following trade-offs accepted:
84
+
85
+
***Wikilinks to HTML docs need the explicit extension (`[[doc.html]]`).** Extensionless non-Markdown links are not first-class in Obsidian's link index, and click-only plugin handling would leave backlinks and unresolved-link state inconsistent.
86
+
***Links from HTML to Obsidian docs should use Obsidian URI links plus `target="_blank"`.** They hand off to Obsidian without letting the iframe navigate the parent window directly; direct same-tab navigation would require top-navigation sandbox permissions and weaken the boundary.
87
+
***Cookies, `localStorage`, `sessionStorage`, and `IndexedDB` are intentionally unavailable.** Enabling them would require same-origin privileges, which would also let HTML share origin with Obsidian instead of staying isolated.
88
+
***Context must be passed into the iframe, the iframe cannot reach out and pull in.** HTML can load browser-allowed network resources, but it cannot inspect Obsidian, other notes, or local vault files. So for example, the HTML page cannot access Obsidian themes, snippets, vault-relative asset paths, unless they are explicitly passed into the iframe context. Use inline CSS/assets, `data:` URLs, or browser-allowed HTTPS URLs instead.
89
+
62
90
## Feedback / Support
63
91
64
92
This plugin will stay simple and do this one thing well.
0 commit comments