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

elijahchan2019elijahchan2019166 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/elijah7x/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 months ago
Created
2 months ago
Updates
2 releases
Downloads
166
Compatible with
Obsidian 1.5.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
elijahchan2019elijahchan2019elijahchan2019
GitHubelijah7x
  1. Community
  2. Plugins
  3. HTML
  4. HTML Live Editor

Related plugins

LanguageTool Integration

Advanced grammar and spell checking, powered by LanguageTool.

Meta Bind

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

Advanced Tables

Improved table navigation, formatting, and manipulation.

Thino

Quickly capture memos and display them in the sidebar with a heatmap. (Closed source)

Editing Toolbar

The Editing Toolbar is modified from cMenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.

Outliner

Work with your lists like in Workflowy or Roam Research.

Hover Editor

Transform the Page Preview hover popover into a fully working editor instance.

Sort and Permute lines

Sort and Permute lines in whole file or selection.

Creases

Tools for effectively folding Markdown sections.

Various Complements

Complete words similar to auto-completion in an IDE.