Clippy: 1-Click Text Copy

AnkiWeb addon 2024757096

Wraps card-template text in a <clip> tag to add a faint border and clipboard icon, enabling one-click copying of the text for translation or lookup.
AI-generated summary; may contain mistakes.

card-templates

Open on AnkiWeb Find alternatives

AnkiWeb

Votes
1 (๐Ÿ‘ 1 ยท ๐Ÿ‘Ž 0)
Updated
2026-03-03
Anki versions
25.02.5~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
JavaScript, Python, JSON, CSS
Description language
en

Maintenance

stale

  • Last update or commit: 2026-03-03 (243 days before the snapshot).

GitHub

No GitHub repository linked.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
25.02.5+2026-03-03
History across monthly snapshots

Loadingโ€ฆ

Similar addons

Style Buttons for Editor๏ผˆby Scarlett) โ€”โ€” ๆ นๆฎ็ฌ”่ฎฐ็ฑปๅž‹็š„ CSS ่‡ชๅŠจ็”Ÿๆˆๆ ทๅผๅฟซๆทๆŒ‰้’ฎ

Parses a note type's CSS custom classes into one-click editor toolbar buttons that wrap or unwrap selected text, with drag reordering, previews, shortcuts, and customizable settings.

formattingshortcutsappearancecard-templates

3 votes 44% approval ๐Ÿ‘ 3 ยท ๐Ÿ‘Ž 0 โญ 0 Anki 25.09.4~ Updated 2026-08-04
Quick Template Copy fork

Copies pre-formatted information from selected Anki Browser notes using customizable per-note-type templates, hotkeys, tag placeholders, and escaped HTML for Word/Excel compatibility.

exportformattingshortcutsfork-or-reupload

1 votes 21% approval ๐Ÿ‘ 1 ยท ๐Ÿ‘Ž 0 โญ 0 Anki 2.1.1~ Updated 2026-08-12

Description

While reviewing foreign language study cards, I've found myself copying text from the card to paste into google translate or a dictionary. This takes several steps, Mouse click > Drag to select relevant text > Right click > Copy, which becomes tiring.

Clippy makes such use cases as easy as 1-click. In the card template, wrap text with a markup. Clippy will draw a faint border around the text and show a clipboard icon next to it. Click the text or the icon to copy the text.

Examples

Example #1: Wrap a field name, to 1-click copy.

{{Front}}
Answer : {{Back}}

<clip>{{GoogleMapsPlusCode}}</clip>

Example #2 : Wrap multiple text blocks in a card. Each <clip> element gets its own clipboard icon.

<clip>{{GoogleMapsPlusCode}}</clip>

<clip>http://wikipedia.com/{{Location Name}}</clip>

Example #3 : Highlight text & icon using Anki CSS class. Add correcponding CSS in your card styling section.

<clip class="class-x">{{GoogleMapsPlusCode}}</clip>

<clip class="classy">http://wikipedia.com/{{Location Name}}</clip>

Example #4 : Use CSS selectors to style the text and the icon

/* Show icon when mouse is over clipboard */
.copy-icon { cursor: help; }

/* Style the clip text */
clip.class-x { color: blue; }

/* If desired icon can be styled different from text */
clip.class-x .copy-icon { color: #007bff; }

Testing & Validation

This addon on was tested on MacOS Anki Desktop Version 25.02.5.

Background information

Wouldn't it be simpler to use javascript in the card template to copy to the clipboard?

Anki (or the underlying QT engine) does not permit javascript writes to the clipboard. Somethiing simple like the below, used in traditional web development, fails with a Not AllowedError: Write permission denied

<span onclick="navigator.clipboard.writeText(text)">Click to copy</span>

There is a legacy technique using document.execCommand("copy") that still works. This approach is a kludge (see code snippet below). Moreover, this command has been deprecated in browser engines.

<span onclick="copyText(this.innerText)">
  Click to copy
</span>

<script>
function copyText(text) {
    const textarea = document.createElement("textarea");
    textarea.value = text;
    textarea.style.position = "fixed";  // prevent scrolling
    textarea.style.opacity = "0";
    document.body.appendChild(textarea);
    textarea.select();

    try {
        const successful = document.execCommand("copy");
        alert(successful ? "Copied" : "Copy failed");
    } catch (err) {
        alert("execCommand error: " + err);
    }

    document.body.removeChild(textarea);
}
</script>