315dc425e4
* Add support for injecting the text selection into Anki cards * Add selection-text * Upgrade to add {selection-text} * Update descriptions * Update test data
56 lines
1.7 KiB
Handlebars
56 lines
1.7 KiB
Handlebars
{{#*inline "selection-text"}}
|
|
{{~#if (hasMedia "selectionText")}}{{#getMedia "selectionText" format="text"}}{{/getMedia}}{{/if~}}
|
|
{{/inline}}
|
|
|
|
{{<<<<<<<}}
|
|
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{/each}}
|
|
{{=======}}
|
|
{{#each glossary}}{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}{{/each}}
|
|
{{>>>>>>>}}
|
|
|
|
{{<<<<<<<}}
|
|
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{#unless @last}} | {{/unless}}{{/each}}
|
|
{{=======}}
|
|
{{#each glossary}}{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}{{#unless @last}} | {{/unless}}{{/each}}
|
|
{{>>>>>>>}}
|
|
|
|
{{<<<<<<<}}
|
|
{{#each glossary}}<li>{{#multiLine}}{{.}}{{/multiLine}}</li>{{/each}}
|
|
{{=======}}
|
|
{{#each glossary}}<li>{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}</li>{{/each}}
|
|
{{>>>>>>>}}
|
|
|
|
{{<<<<<<<}}
|
|
{{~#if definition.audioFileName~}}
|
|
[sound:{{definition.audioFileName}}]
|
|
{{~/if~}}
|
|
{{=======}}
|
|
{{~#if (hasMedia "audio")~}}
|
|
[sound:{{#getMedia "audio" format="fileName"}}{{/getMedia}}]
|
|
{{~/if~}}
|
|
{{>>>>>>>}}
|
|
|
|
{{<<<<<<<}}
|
|
<img src="{{definition.screenshotFileName}}" />
|
|
{{=======}}
|
|
{{~#if (hasMedia "screenshot")~}}
|
|
<img src="{{#getMedia "screenshot" format="fileName"}}{{/getMedia}}" />
|
|
{{~/if~}}
|
|
{{>>>>>>>}}
|
|
|
|
{{<<<<<<<}}
|
|
{{~#if definition.clipboardImageFileName~}}
|
|
<img src="{{definition.clipboardImageFileName}}" />
|
|
{{~/if~}}
|
|
{{=======}}
|
|
{{~#if (hasMedia "clipboardImage")~}}
|
|
<img src="{{#getMedia "clipboardImage" format="fileName"}}{{/getMedia}}" />
|
|
{{~/if~}}
|
|
{{>>>>>>>}}
|
|
|
|
{{<<<<<<<}}
|
|
{{~#if definition.clipboardText~}}{{definition.clipboardText}}{{~/if~}}
|
|
{{=======}}
|
|
{{~#if (hasMedia "clipboardText")}}{{#getMedia "clipboardText" format="text"}}{{/getMedia}}{{/if~}}
|
|
{{>>>>>>>}}
|