No description
Find a file
JLDiaz (m) 49ce754986 1.1.3
2026-05-20 11:23:14 +02:00
.github/workflows Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
src fix: remove unused from and to variables 2026-05-20 11:23:06 +02:00
.editorconfig Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
.gitignore Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
.npmrc Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
demo.gif Add demo GIF to README 2026-05-12 22:55:02 +02:00
esbuild.config.mjs Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
eslint.config.mts Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
LICENSE Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
manifest.json 1.1.3 2026-05-20 11:23:14 +02:00
package-lock.json 1.1.3 2026-05-20 11:23:14 +02:00
package.json 1.1.3 2026-05-20 11:23:14 +02:00
README.md Added command to paste text as copy-link 2026-05-13 13:54:44 +02:00
styles.css Release 1.1.2: Fixed Reading Mode icons and resolved strict validator warnings 2026-05-13 22:06:01 +02:00
tsconfig.json Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
version-bump.mjs Initial commit for obsidian-copy-protocol 2026-05-12 22:10:46 +02:00
versions.json Release 1.1.2: Fixed Reading Mode icons and resolved strict validator warnings 2026-05-13 22:06:01 +02:00

Copy Text Protocol

Plugin Demo

What is this for?

Have you ever wanted to create a note that, when you click a link, automatically copies a snippet of text to your clipboard? This plugin makes that possible.

Some use cases:

  • A "cheat sheet" note with commands, passwords, or templates — click the link, paste anywhere.
  • A collection of code snippets ready to paste into a terminal.
  • Frequently used texts (email signatures, boilerplate, addresses) accessible from any note.
  • Query strings to paste into other apps (e.g. to search specific emails in Outlook, my primary use case)

How it works

The plugin registers a custom obsidian://copy protocol. When you click a link using this protocol, the text embedded in the URL is silently copied to your clipboard and a small confirmation notice appears — no popups, no external apps.

[Click to copy](obsidian://copy?text=Your-text-here)

When clicked, "Your-text-here" is copied to your clipboard.

For text containing spaces, wrap the URL in angle brackets:

[Click to copy](<obsidian://copy?text=Hello world>)

Other special characters need to be encoded, and as you can see it can be tedious to do manually, so a command for that is included.

The plugin includes a command called Copy Protocol: Paste clipboard as copy-protocol link that automates the process. It reads your current clipboard content and inserts a ready-to-use markdown link at the cursor. If you have text selected in the editor, that selection becomes the link label; otherwise, the clipboard text itself is used as a label.

To assign a keyboard shortcut

  1. Open Settings → Hotkeys.
  2. Search for "Paste clipboard as copy-protocol link".
  3. Click the + button and press your preferred key combination.

Example workflow

  1. Copy a command or text you want to reuse (e.g. git log --oneline).
  2. In your note, type a label like Show git log and select it.
  3. Press your hotkey.
  4. The selection is replaced with:
    [Show git log](<obsidian://copy?text=git%20log%20--oneline>)
    
  5. Clicking that link copies git log --oneline to your clipboard instantly.

Installation

You can install this plugin from the Community Plugins settings of Obsidian, or via BRAT:

  1. Open the BRAT settings in Obsidian.
  2. Click Add Beta plugin.
  3. Paste the repository URL: jldiaz/copy-protocol-plugin.
  4. Enable the plugin in your Community Plugins list.