Easy way to remove all HTML formatting

Is there an easy way to remove HTML formatting when editing a note, without having to actually edit the HTML?

I am often copying text from websites, and only want to keep the actual text. However, when pasting the text into Anki, it also copies over div or h1 elements, hyperlinks, etc. I can’t remove those using the “remove formatting” button.

As a workaround I’ve been pasting the text into Notepad first, but it would of course be great if there was an easier method in Anki itself. Something like a button that changes the text into plain text only?

Ctrl + Shift + V should work.

2 Likes

Also:
Preferences > Basic > Paste without Shift strips formatting

3 Likes

CTRL+SHIFT+V doesn’t do anything for me, does not even paste the text… maybe I’m doing something wrong?

I turned on the Paste without shift strips formatting setting and that does seem to work! The only thing it doesn’t remove is the div tags, but it’s definitely an improvement.

Thanks for your help!

  1. select all card/notes where you want to remove the html/css tags
  2. in Find/Replace dialog check “treat input as regular expression” and in “Find” field paste this expression:
    <[^>]+>
  3. Leave “Replace with” empty, and press OK

Done

Are you using a Mac? Hold the Shift key while doing the usual macOS paste shortcut.