Formatting disappearing when editing

Hi,

On iPhone (anki 2.0.92 (20092.3), iOS 16.4.1) when editing a card some formatting disappears.

Below is original card (before editing) when viewed on desktop with html on. Note certain letters in word testing are in bold. I am not sure how I ended up with “var(–field-bg)”, etc. I think it was automatically added by an older version of Anki, which I understand is now fixed and is no longer being added.

Original html

<br><span style="color: var(--field-fg); background: var(--field-bg);">t</span><b style="color: var(--field-fg); background: var(--field-bg);">es</b><span style="color: var(--field-fg); background: var(--field-bg);">t</span><b style="color: var(--field-fg); background: var(--field-bg);">i</b><b style="color: var(--field-fg); background: var(--field-bg);">n</b><span style="color: var(--field-fg); background: var(--field-bg);">g</span>

<div><br></div><div><div>
</div></div>

Below is what happens to formatting of the card after entering one letter A and Enter at line 1 of the card on iPhone version of Anki, saving the card, syncing with Anki for desktop and viewing it with html on. Note that none of the letters in word testing are in bold any longer. It’s great that “var(–field-bg);” gets removed. Would be good if bold remained intact after editing.

The html of new card is

A<br>testing

<div><br></div><div><div>
</div></div>

Big thank you for the App!

That unwanted formatting is being added by the iOS webview from what I can tell, and AnkiMobile is trying to strip it out. I’ll make a note to see if this can be handled better; in the mean time if you use the Find&Replace feature in the Browse screen to replace style="color: var(--field-fg); background: var(--field-bg);" in all of your notes with nothing, then it should prevent the bold tags from getting lost.

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