How to set default font for editor?

I noticed there are two ways you can set a default font.

  • I found I can use EditorView.theme(), but that relies on setting HTML/CSS classes
  • Or I can use styleTags() to style tags.content which styles paragraphs.
  • Or I can set all:{} option in HighlightStyle

I know I achieve different results, because the highlighting happens differently.

But my question is - is there some kind of performance overhead to it? Is there any reason at all to prefer EditorView.theme() or is using styleTags() on t.content okay?

styleTags styles individual types of tokens. Unless you want different fonts for different tokens, just setting a single font for the whole editor seems more practical.


But using EditorView.theme() or using all: {} in HighlightStyle (as of CodeMirror Reference Manual)?