elijahchan201956 downloadsClick to edit text in HTML blocks directly within Live Preview mode.
An Obsidian plugin that lets you edit the text inside HTML blocks directly in Live Preview — just click the text and start typing.
When you embed complex HTML layouts in Markdown (flowcharts, cards, tables, …) and frequently tweak their text:
<div>…</div> blockEnter to save, Esc to cancelThe block below is rendered by the plugin in Obsidian as a clickable card:
Paste it into a Live Preview note and click the sentence to edit it.
The plugin offers two complementary editing paths in Live Preview:
.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 }).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.
isDesktopOnly). Click-to-edit relies on caretRangeFromPoint, which is unreliable on mobile WebViews.After submission to the Obsidian Plugin Directory, search for HTML Live Editor under Settings → Community Plugins.
git clone https://github.com/elijahchan2019/plugin-html_live_editor.git
cd plugin-html_live_editor
npm install
npm run build
manifest.json, main.js, and styles.css into your vault's .obsidian/plugins/html-live-editor/ directory> / & / < edit correctly; named entities like © / — / may cause source-position drift.For bugs or feature requests, please open an Issue.
MIT License
Made by Elijah