J17 downloadsCopies selected text from read-only Obsidian Canvas cards.
A small, standalone Obsidian plugin with one purpose: copy highlighted text from Markdown and text cards while a Canvas is in read-only mode.
<your-vault>/.obsidian/plugins/canvas-readonly-copy-fix/main.js and manifest.json into that folder.If an earlier version is already installed, replace its main.js and
manifest.json, then restart Obsidian or reload the plugin.
Ctrl+C on Windows/Linux or Cmd+C on
macOS).Choose the copy format under Settings -> Canvas Read-Only Copy -> Copy format:
**bold**.
This is the default and also provides rich HTML to applications that support
it.**, _, or backticks and without rich formatting.Copy actions outside the selected read-only Canvas retain Obsidian's normal clipboard behavior. Body-targeted copy events only use a selection from the active Canvas, and inputs, text areas, and other editable controls inside a Canvas retain their native copy behavior.
readonly flag and may need a
small update if Obsidian changes that internal field.The plugin is intentionally distributed as a single hand-written main.js
file. There is no build step and there are no runtime dependencies.
Run the dependency-free checks with:
node --check main.js
node --check plugin.test.js
node --unhandled-rejections=strict plugin.test.js
The checks cover all copy formats, clipboard event scoping across multiple Canvas views, native copy behavior for editable controls, read-only versus edit mode, and listener cleanup when Canvas documents close or reopen.