I was looking for a solution to get rid of all html tags in notes, and I wanted it to be done in bulk. The extension developed a few years ago didn’t work at all, and I finally discovered that we can use the recently introduced regexp search feature. Pretty neat and easy solution.
select all cards/notes from which you want to remove html/css tags
in the Find/Replace dialog, check “treat input as regular expression” and paste the following expression into the “Find” field
<[^>]+>
Be careful because this will get rid of italics and boldface too. And if you have any multi-line content in a field, it will merge the lines into one, because it will remove all <br> tags.
You are right, to keep and italics/bold we can first create a substitution for them in some unique pattern, next apply the regexp as I mentioned, and then do a reverse substitution to bring back , italics, bolds.