エディタプレビューに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.