Skip to content

1.0.3

Choose a tag to compare

@github-actions github-actions released this 18 Jun 05:12
· 2 commits to main since this release
Fix: Use execCommand for HTML clipboard copy in Obsidian

navigator.clipboard.write() with ClipboardItem does not reliably write
text/html in Electron's renderer process. Replace with DOMParser +
contentEditable + execCommand approach using Obsidian's preferred APIs:
- DOMParser instead of innerHTML (avoids scanner error)
- createDiv() and setCssStyles() instead of createElement/style.*
- activeDocument and activeWindow throughout
- execCommand('copy') on selected rich content (deprecated warning,
  but the only reliable way to write text/html in Electron)

Fixes: formatted paste broken in all destinations (Google Docs, Word,
OneNote, Email) — pasting raw markdown instead of styled HTML.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>