monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

Themes don't look like in example

Open avysotskiy-sc opened this issue 2 years ago • 1 comments

I selected a theme from this list https://monaco-react.surenatoyan.com/ and downloaded JSON https://github.com/brijeshb42/monaco-themes/blob/master/themes/Tomorrow.json

const TOMORROW_MONACO_THEME = require('./Tomorrow.json');


<Editor height={'80vh'}
        defaultLanguage="JSON"
        defaultValue={defaultValue}
        onChange={handleEditorChange}
        theme={'myCustomTheme'}
        onMount={handleEditorOnMount}
/>

function handleEditorOnMount(editor, monaco) {
  // Define the new theme
  monaco.editor.defineTheme('myCustomTheme', TOMORROW_MONACO_THEME);
  // Apply the new theme
  monaco.editor.setTheme('myCustomTheme');
};

The theme is applied but it isn't look like in example.

My editor with theme Tomorrow: image

Tomorrow theme from example:

image

avysotskiy-sc avatar Dec 08 '23 07:12 avysotskiy-sc

https://monaco-react.surenatoyan.com/ uses 0.3.3 version of monaco-themes. This, I think, from the latest version, which is 0.4.4. This might be the issue.

suren-atoyan avatar Dec 08 '23 19:12 suren-atoyan

This issue has been marked as stale due to inactivity. It will be closed in 7 days unless further activity occurs.

github-actions[bot] avatar Mar 11 '25 00:03 github-actions[bot]

Closing due to inactivity. Feel free to reopen if needed.

github-actions[bot] avatar Mar 18 '25 00:03 github-actions[bot]