Desktop Anki Auto-Edits drive me crazy

Even with Auto-Close HTML tags unchecked, anki will automatically add HTML wherever it damn pleases even if I copy and paste the HTML in to force it to keep it raw.

I used advanced card templates where I like to be in control of everything. by that I mean one of the fields is a javascript array with html code within single ’ quotes. So everything needs to be very particular and I don’t want anki modifying it automatically.

One particular example:
when i copy and paste the following into a field entry that is in HTML editor mode:

[4, '<p>hello world<p>'],
...etc similar entried

Now I made an error with the closing tag, but anki instead of allowing me to notice and correct it on my own will automatically modify it to

[4, '<p>hello world<p>'],</p></p>

which completely messes everything up so that even if I correct there are html tags in all sorts of places (assuming harder to detect mistakes unlike above which was simple for illustration). I just don’t want anki’s help here. How can I disable this?

1 Like

There’s no easy way to “fix” this - the text you enter in gets converted to the browser DOM, which can result in differences from the original text in some circumstances, such as when malformed HTML or implicit closing tags are used.

Bummer. Really drives me crazy because I get super OCD now worried if something changed while I was not paying attention. In the end takes longer to debug when something goes wrong because i have now check everything, regardless of directly typed or even copied and pasted. I understand if browser modifies it, but then why are those browser modifications saved back directly into the anki note data structure?

Because the editor content no longer matches the contents of the field, so it’s seen as a change.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.