Anki is automatically adding unwanted tables

Ref Anki Version ⁨2.1.60 for Windows Desktop.

I created a new Note type, cloning Basic, and added fields and content.

In the preview window, some of the entries are center aligned as desired, but some are left aligned. I just have one alignment directive in Styling, the default align: center.

I exported the deck as text to review the HTML, and found that Anki had added table entries!

Ordinary Note type is like:
"(my data)

Whereas this new Note type is like
<td>(my data)</td>

For new Note type I tried twice, once cloning a previously created Note type, then cloning Basic Note type. Same problem in both cases.

Why is Anki adding these tables, and how can I fix that?

Depending on where you copied your data from, the html could be in the field itself. Click the <> next to your field name while editing to see if that’s where the table is located. I believe you can hold shift down while pasting to strip the formatting. You can also change this option to auto do it without holding shift if you go to Tools > Preferences > Editing > Paste without shift key strips formatting.


I think it’s unlikely that Anki added the tables - they are more likely either from copying & pasting from an external source, or via some add-on.

Thank you for this great tip!

“Click the <> next to your field name while editing to see if that’s where the table is located”.

I did not know about that. When I do that I see the table code.

And the reason there was table code in the field is because I copied the data from Excel directly instead of running it through Notepad.

Usually I copy my Anki Deck content from Excel to Notepad, save as text, then import it to my Anki Deck. But in this case I was playing with creating a new Deck, and copied directly.

Now my Deck is okay. Many thanks for the assistance!

1 Like

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