הוספת CSS לתצוגה המקדימה בעורך

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?

2 לייקים

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;
    }
  }
}
3 לייקים

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.

2 לייקים

Thank you, Falco.

לייק 1

@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.