简体   繁体   中英

How do you retrieve a theme from the monaco editor?

Basically what the title is asking. I know that monaco.editor.setTheme() and .defineTheme() exist, but how would one retrieve the JSON or the object that defines the theme that is currently being used, or the JSONs/objects of other stored themes in the browser?

Update: The unofficial way to retrieve the current theme in monaco-editor as of version 0.21.2 is editor._themeService._theme


Note: in monaco-editor version (0.21.2), editor._themeService.getTheme() throws an error.

Uncaught Error: editor._themeService.getTheme is not a function

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM