Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ See `test/fixture.html` for the full list of features exercised — and the inli

After installing the plugin, you can open `.html` files in Obsidian tabs (like a doc), embedded files, and canvas cards.

Obsidian shows `.md` files in the file explorer by default. To see `.html` files too, enable **Settings → Files & links → Show all file types**.

Link to HTML docs with the explicit `.html` extension:

```markdown
Expand Down
2 changes: 1 addition & 1 deletion docs/ISSUE-source-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This is a **surgical addition**, not a redesign.
- [ ] Theme refresh (dark/light toggle, `css-change`) does not clobber the source editor. Simplest acceptable implementation: skip the preview re-render while source mode is active.
- [ ] Existing iframe sandbox model is unchanged: Blob URL, `sandbox="allow-scripts allow-popups allow-forms"`, no `allow-same-origin`, sandbox attribute set before `src`. See `main.ts:142-154` and the explanatory comment.
- [ ] `HtmlEmbed` (HTML embeds in markdown/canvas) stays read-only — no toggle, no editor.
- [ ] All existing behavior preserved: cross-file link navigation, doctype preservation, theme variable injection, "Show all file types" notice.
- [ ] All existing behavior preserved: cross-file link navigation, doctype preservation, theme variable injection.

## Approach

Expand Down
13 changes: 0 additions & 13 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
Component,
FileView,
getLinkpath,
Notice,
type OpenViewState,
type PaneType,
Plugin,
Expand Down Expand Up @@ -272,18 +271,6 @@ export default class HtmlDocsPlugin extends Plugin {
embedRegistry.unregisterExtension("html");
embedRegistry.unregisterExtension("htm");
});

// Obsidian hides files with unrecognized extensions in the file
// explorer unless "Show all file types" is on; registering the
// extension only routes the view, it doesn't add to that filter.
const vault = this.app.vault as { getConfig?: (key: string) => unknown };
const showUnsupported = vault.getConfig?.("showUnsupportedFiles");
if (showUnsupported === false) {
new Notice(
"To see .html files in your file explorer, please enable 'Show all file types' in Settings → Files & Links.",
10000,
);
}
}

trackHtmlEmbed(embed: HtmlEmbed): void {
Expand Down