Personal CSS-classes in the default editor

Hey everyone,
I have a question regarding CSS and the editor in Anki.

Is it possible to define and use custom CSS classes that are already rendered inside the editor (not only on the review screen) without an add-on?

For example, <u> text is shown as underlined directly in the editor.
I have my own CSS class (e.g. a wavy underline) and I would like text marked with it to appear wavy while editing, not only during review.

Something like:

<wavy>text</wavy>

.wavy {
  text-decoration-line: underline;
  text-decoration-style: wavy;
}

Is there a way to make the editor apply such custom styles, or is the editor styling hard-coded?

Thanks in advance!

It’s hard coded as far as I know, but if addons are acceptable, they should be able to help you apply your styles. There are also addons that show a preview of your card while you write / edit the card.

Edit: Unless, of course, you add the css directly into the fields themselves. But that would overwrite the card templates styles and bloat your collection database.

1 Like

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