Polyglot Renderer

pending

by nimaap

Render HTML code blocks as live sandboxed previews, open HTML files in a custom view, and smartly handle HTML paste.

1 starsUpdated 17d agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

Polyglot Renderer

An Obsidian plugin that renders HTML code blocks as live sandboxed previews, opens HTML files in a custom view, and provides smart paste handling for HTML content.

Features

Inline HTML rendering

Write a fenced html code block and see it rendered live in a sandboxed iframe:

```html
<h1 style="color: coral;">Hello from HTML</h1>
<p>This renders as a live preview.</p>
```

Scripts are blocked — all rendering happens inside a sandboxed iframe with allow-same-origin only.

HTML file view

Open .html and .htm files directly in Obsidian. Files render in a sandboxed iframe and update live when you edit the source externally.

Embed rendering

Link to an HTML file with ![[file.html]] and use the eye toggle button to render it inline without leaving your note.

Smart paste handling

Pasting HTML files (e.g. from Finder): saves them to your vault and inserts embed links so they can be rendered inline with the embed toggle. You can configure where files are saved — current note folder, a default folder, or ask every time.

Pasting HTML content (e.g. from a browser): choose to render it as a live HTML block, convert to markdown, or paste as plain text. Configurable to always render, always use Obsidian's default, or ask every time.

Settings

SettingOptionsDefault
Enable inline HTML renderingOn / OffOn
HTML file paste destinationAsk every time / Current note folder / Default folderAsk every time
Default paste folderAny vault path
HTML content paste behaviorAsk every time / Render as HTML block / Obsidian defaultAsk every time

Security

All HTML rendering uses sandboxed iframes. Scripts run inside the sandbox so interactive HTML files work as expected (collapsible sections, table of contents navigation, etc.). External links open in your default browser. The sandbox prevents access to Obsidian internals, network requests, and top-level navigation.

Installation

Install manually from the latest GitHub release:

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Create a folder polyglot-renderer inside your vault's .obsidian/plugins/ directory.
  3. Place the downloaded files in that folder.
  4. Enable the plugin in Settings > Community plugins.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.