CodeMirror6: editor.setOption('theme', 'blackboard')

I have created an editor via:

let editor = new Editorview( ... )

and everything works fine.

I try to set a theme using editor.setOption('theme', 'blackboard');
and it appears nothing happens.

From googling around, it appears this is the CodeMirror5 way of doing things.

In CodeMirror6, how do I set my theme to ‘blackboard’ (or any black-background theme?)

The configuration example (specifically the section about dynamic configuration) should help.

1 Like