Change Wrap commands / shortcuts to use anki-mathjax

This commit is contained in:
Henrik Giesel 2021-08-07 22:18:31 +02:00
parent c3f56ad5cd
commit de056fbd89
2 changed files with 6 additions and 10 deletions

View file

@ -28,12 +28,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/>
<style lang="scss">
img {
vertical-align: middle;
&.block {
display: block;
margin: auto;
}
.block {
display: block;
margin: auto;
}
</style>

View file

@ -101,7 +101,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:shortcutLabel
>
<DropdownItem
on:click={() => wrapCurrent("\\(", "\\)")}
on:click={() => wrapCurrent("<anki-mathjax>", "</anki-mathjax>")}
on:mount={withButton(createShortcut)}
>
{tr.editingMathjaxInline()}
@ -115,7 +115,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:shortcutLabel
>
<DropdownItem
on:click={() => wrapCurrent("\\[", "\\]")}
on:click={() => wrapCurrent("<anki-mathjax block=\"true\">", "</anki-matjax>")}
on:mount={withButton(createShortcut)}
>
{tr.editingMathjaxBlock()}
@ -129,7 +129,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:shortcutLabel
>
<DropdownItem
on:click={() => wrapCurrent("\\(\\ce{", "}\\)")}
on:click={() => wrapCurrent("<anki-mathjax>\\ce{", "}</anki-mathjax>")}
on:mount={withButton(createShortcut)}
>
{tr.editingMathjaxChemistry()}