ashmind / mirrorsharp

MirrorSharp is a code editor <textarea> built on Roslyn and CodeMirror
BSD 2-Clause "Simplified" License
220 stars 39 forks source link

Set codemirror theme from mirrorsharp? #179

Closed Sicos1977 closed 2 years ago

Sicos1977 commented 2 years ago

Is it possible to set the theme that is used by codemirror?

In codemirror I can do it like this.

        var editor = window.CodeMirror.fromTextArea(element, {
            theme: 'darcula' 
        });
Sicos1977 commented 2 years ago

ms.getCodeMirror().setOption("theme", "darcula");

ashmind commented 2 years ago

Something like this should also work:

mirrorsharp(element, { /* other options..., */ forCodeMirror: { theme: 'darcula' } })