# MathJax undo does not work

Hi,

First, thanks a lot for mathjax shown in Anki. I love when you allow me to stop updating my add-ons! Especially when your feature is far better than mine!
However, right now, there is some actual trouble. If you delete an anki-mathjax with content (e.g. (\sqrt2) element and do undo (ctrl-z), it reintroduces the anki-mathjax element but not its content.

Also, to be certain that I understand decorated.ts comment correctly. There is no plan to switch ( for in the file format. We won’t have to update ankidroid to take them into account, right?

Yes, undoing is currently still relying on .execCommand, which means it doesn’t cooperate with things that directly modify the DOM (like the Mathjax editor, or the new surrounding feature which we use for the bold, italic, and underline buttons)

There is no plan to switch ( for in the file format. We won’t have to update ankidroid to take them into account, right?

Yes, the Mathjax editor is entirely an editing phenomenon, and doesn’t change how the Mathjax looks on disk.

1 Like

Second feedback after some more use. I would really really love a way to edit mathjax without double clicking on it. I often edit cards using keyboard only. Tabs to move between fields (the fact that you can deactivate fields is wonderful, a huge win of time, thank you!), and the arrow key to move in the field. And then, I arrive at the mathjax image and I realize that I can’t edit it. My choices are either to delete it (right now I wanted to change (V_i) to (V_1) and (V_2), so it would make sens) and recreate it or to mouve my hand to the mouse. I would love to be able to enter the mathjax mode with keyboard only

We’ve actually already added that feature on master. You can use the arrow keys to move into the Mathjax editor, and you can also move out of it.

1 Like

Your work is wonderful. Thank you so much!

2 Likes