Open matthanley opened 8 years ago
I agree ... I also have the issue where SMDE theme overwrites my CodeMirror theme:
Before SMDE is added:
After SMDE is added:
Basically just by wrapping the SMDE into its own element with a common class, e.g. .smde
you can then change the selectors in the SMDE css from this .CodeMirror .CodeMirror-code .cm-header-3
into .smde .CodeMirror .CodeMirror-code .cm-header-3
which will sort out any conflicts amongst themes.
UPDATE:
Just tested my theory and can confirm it's working as expected. Here is the end result, CodeMirror and SMDE side-by-side on the same page:
UPDATE no.2: Seems there are still some conflicts, but on the code level ... SMDE somehow overwrites the CodeMirror configuration in a way that it doesn't include all the modes. You can see from my previous screen that the theme looks good, but the highlighting on css code doesn't work, while when I remove SMDE, the highlight is working properly.
Probably something that would be good for the future version 2 redesign.
Default CodeMirror themes are overridden by the CSS distributed with SMDE. A more flexible approach would be to implement a separate theme for CodeMirror in the distributed CSS and set this theme on the CodeMirror instance by default.