Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

HTML Live Editor

elijahchan2019elijahchan201956 downloads

Click to edit text in HTML blocks directly within Live Preview mode.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

English · 简体中文

An Obsidian plugin that lets you edit the text inside HTML blocks directly in Live Preview — just click the text and start typing.

✨ Features

  • Click to edit — click any text inside an HTML block to open an editor
  • Enter to save / Esc to cancel — familiar keyboard shortcuts
  • Auto-cleanup — cursor leaving the source range restores the rendered view
  • DOM ↔ source mapping — DOM node indexes align to source positions, supporting nested and repeated text
  • Dark theme — adapts to Obsidian's native dark mode

🎯 Use case

When you embed complex HTML layouts in Markdown (flowcharts, cards, tables, …) and frequently tweak their text:

  1. Open a document containing a <div>…</div> block
  2. Click the text you want to change
  3. Edit it in the popover
  4. Enter to save, Esc to cancel

Example

The block below is rendered by the plugin in Obsidian as a clickable card:

Click any text in here to edit it inline.

Paste it into a Live Preview note and click the sentence to edit it.

⚙️ How it works

The plugin offers two complementary editing paths in Live Preview:

  • Native HTML embed click-editing — instead of competing with Obsidian's native .cm-html-embed.cm-embed-block widget, a ViewPlugin listens for clicks during the capture phase. caretRangeFromPoint() + view.posAtCoords() map the click back to a Markdown source position, the popover edits it, and the result is written back via view.dispatch({ changes }).
  • Widget inline editing — larger HTML blocks are rendered with Decoration.replace as an interactive widget; hovering reveals a toolbar, and clicking text inside it enters inline-edit mode.

All rendered HTML passes through Obsidian's built-in sanitizeHTMLToDom (DOMPurify-backed) before being inserted.

📋 Compatibility

  • Obsidian: 1.5.0+
  • Platform: desktop only (isDesktopOnly). Click-to-edit relies on caretRangeFromPoint, which is unreliable on mobile WebViews.
  • Modes:
    • ✅ Live Preview (recommended)
    • Reading (read-only display)

🛠️ Install

From the Community Plugin Directory (once published)

After submission to the Obsidian Plugin Directory, search for HTML Live Editor under Settings → Community Plugins.

Manual install

  1. Clone and build:
    git clone https://github.com/elijahchan2019/plugin-html_live_editor.git
    cd plugin-html_live_editor
    npm install
    npm run build
    
  2. Copy manifest.json, main.js, and styles.css into your vault's .obsidian/plugins/html-live-editor/ directory
  3. Restart Obsidian
  4. Enable HTML Live Editor under Settings → Community Plugins

🚧 Known limitations

  • Named entities: &gt; / &amp; / &lt; edit correctly; named entities like &copy; / &mdash; / &nbsp; may cause source-position drift.
  • Large blocks: HTML blocks > 5000 characters are not heavily optimized.
  • Deep nesting: very deeply nested HTML (> 10 levels) may reduce mapping accuracy.

🐛 Issues

For bugs or feature requests, please open an Issue.

📄 License

MIT License


Made by Elijah

HealthExcellent
ReviewCaution
About
Edit HTML blocks directly in Live Preview by clicking any text to open a popover or inline editor. Save edits with Enter or cancel with Esc while changes map back to the Markdown source via DOM-to-source mapping and auto-revert rendering when focus leaves. Support nested and repeated text and match Obsidian's dark mode.
HTMLEditing
Details
Current version
1.2.2
Last updated
2 weeks ago
Created
2 weeks ago
Updates
2 releases
Downloads
56
Compatible with
Obsidian 1.5.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
elijahchan2019elijahchan2019elijahchan2019
GitHubelijahchan2019
  1. Community
  2. Plugins
  3. HTML
  4. HTML Live Editor

Related plugins

Advanced Tables

Improved table navigation, formatting, and manipulation.

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.

Outliner

Work with your lists like in Workflowy or Roam Research.

Creases

Tools for effectively folding Markdown sections.

LanguageTool Integration

advanced spell/grammar checks with the help of language-tool.

MetaEdit

Manage your metadata.

Various Complements

Complete words similar to auto-completion in an IDE.

Simplified Chinese Word Splitting

Adds Simplified Chinese word splitting support for the editor and Vim mode.

CSS Editor

Edit CSS snippet files.

Sort and Permute lines

Sort and Permute lines in whole file or selection.