react-codemirror
react-codemirror copied to clipboard
Theme syntax highlighting not working
hi,
I have tried to apply different themes, i can see only background change working,
but code syntax, keywords highlighting not working.
Editor is part of webapp,
could you please advise, what iam missing here

same thing happens here, mode can only work with theme of 'monokai', other themes never work...
I got the Answer. need to import the theme css in your root file such as App.js/index.js
for example:(in our index.js) .... import 'codemirror/lib/codemirror.css'; import 'codemirror/theme/monokai.css'; import 'codemirror/theme/blackboard.css';
... ReactDOM.render( <Provider store={store}> <ThemePicker> <ErrorBoundary> <App /> </ErrorBoundary> </ThemePicker> </Provider>, document.getElementById('root') );
In my case, I didn't have included one of the language-specific modes in the mode folder.