# Applying/showing CSS classes in editor

**URL:** <https://forums.ankiweb.net/t/applying-showing-css-classes-in-editor/22488>\
**Category:** Help\
**Created:** [August 21, 2022, 12:51am UTC](https://forums.ankiweb.net/t/applying-showing-css-classes-in-editor/22488 "2022-08-21T00:51:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chambm](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@chambm](https://forums.ankiweb.net/u/chambm)\
**Post date:** [August 21, 2022, 12:51am UTC](https://forums.ankiweb.net/t/applying-showing-css-classes-in-editor/22488/1 "2022-08-21T00:51:28Z")

</div>

Using Anki 2.1.54, the editor does not apply CSS classes to editor fields. If I directly add a style=“color:red” attribute, it does change the color. But CSS classes make it far easier to change colors for every card at once. For example:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/c/cc278fe9c382d2301a30fe1074174b34ea08dc85.png)

Is there a way to enable colors in the editor that won’t break with the next Anki version?

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [August 21, 2022, 1:09am UTC](https://forums.ankiweb.net/t/applying-showing-css-classes-in-editor/22488/2 "2022-08-21T01:09:05Z")

</div>

[https://ankiweb.net/shared/info/1899278645](https://ankiweb.net/shared/info/1899278645)

---

<div class="post-metadata">

**Author:** ![chambm](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@chambm](https://forums.ankiweb.net/u/chambm)\
**Post date:** [August 21, 2022, 3:32am UTC](https://forums.ankiweb.net/t/applying-showing-css-classes-in-editor/22488/3 "2022-08-21T03:32:53Z")

</div>

Installing that did not seem to fix the issue. Maybe broken on .54?

---

<div class="post-metadata">

**Author:** ![BlackBeans](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/blackbeans/32/2283_2.png) [@BlackBeans](https://forums.ankiweb.net/u/BlackBeans)\
**Post date:** [August 21, 2022, 6:14am UTC](https://forums.ankiweb.net/t/applying-showing-css-classes-in-editor/22488/4 "2022-08-21T06:14:34Z")

</div>

You don’t see the styling in the editor because the editor doesn’t show you a fully rendered version of your card. This means, in particular, that the card styling is never taken into account in the editor.

---

<div class="post-metadata">

**Author:** ![chambm](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@chambm](https://forums.ankiweb.net/u/chambm)\
**Post date:** [August 21, 2022, 3:10pm UTC](https://forums.ankiweb.net/t/applying-showing-css-classes-in-editor/22488/5 "2022-08-21T15:10:48Z")

</div>

OK indeed that addon is broken in .54 but should be fixed in the next release. I’m still not clear whether it shows CSS class styles in the editor fields, but I can ask that on that addon’s thread.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 4:05am UTC](https://forums.ankiweb.net/t/applying-showing-css-classes-in-editor/22488/6 "2023-05-01T04:05:59Z")

</div>

Closed on May 1, 2023, 4:05am UTC


