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"> <style lang="scss">
img { .block {
vertical-align: middle; display: block;
margin: auto;
&.block {
display: block;
margin: auto;
}
} }
</style> </style>

View file

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