Adding CSS to the editor preview

Continuing the discussion from Ordered lists with non-number markers:

Quotes from other thread for context.

What I’m asking in this thread is: is there any way to add custom CSS that is also applied to the editor preview?


I figured it out on my own. The solution is to use the .d-editor-preview CSS class as a selector.

.cooked, .d-editor-preview {
  div[data-wrap="letterlist"] {
    ul, ol {
      list-style-type: upper-alpha;

That’s the way. The previous was specific to the post as it’s show in the stream, you extended it to also apply in the preview area, so that’s the correct solution indeed.


Thank you, Falco.

1 Like

@Falco , if I wanted to differently style the more deeply nested layers of lists, would that be an additional nested level of ol?

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