aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/data
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-26 13:45:48 -0400
committerGitHub <noreply@github.com>2020-09-26 13:45:48 -0400
commitcab5daa22e986fdf0c71a370ebd459efa0a13a61 (patch)
tree1c6b4cbeb783e528e3190bcd4d52b5b6b2e9be72 /ext/bg/data
parentd27349207dc493e6d1e035c2c5606943c990f02f (diff)
Add clipboard-text Anki field (#863)
* Add clipboard-text anki field * Add markers * Update clipboard injection
Diffstat (limited to 'ext/bg/data')
-rw-r--r--ext/bg/data/anki-field-templates-upgrade-v4.handlebars4
-rw-r--r--ext/bg/data/default-anki-field-templates.handlebars4
2 files changed, 8 insertions, 0 deletions
diff --git a/ext/bg/data/anki-field-templates-upgrade-v4.handlebars b/ext/bg/data/anki-field-templates-upgrade-v4.handlebars
index a16b5b68..dc88395a 100644
--- a/ext/bg/data/anki-field-templates-upgrade-v4.handlebars
+++ b/ext/bg/data/anki-field-templates-upgrade-v4.handlebars
@@ -3,3 +3,7 @@
<img src="{{definition.clipboardImageFileName}}" />
{{~/if~}}
{{/inline}}
+
+{{#*inline "clipboard-text"}}
+ {{~#if definition.clipboardText~}}{{definition.clipboardText}}{{~/if~}}
+{{/inline}}
diff --git a/ext/bg/data/default-anki-field-templates.handlebars b/ext/bg/data/default-anki-field-templates.handlebars
index 98f6897b..2849ade9 100644
--- a/ext/bg/data/default-anki-field-templates.handlebars
+++ b/ext/bg/data/default-anki-field-templates.handlebars
@@ -282,4 +282,8 @@
{{~/if~}}
{{/inline}}
+{{#*inline "clipboard-text"}}
+ {{~#if definition.clipboardText~}}{{definition.clipboardText}}{{~/if~}}
+{{/inline}}
+
{{~> (lookup . "marker") ~}}