I have been making a markdown editor called Boostnote using Codemirror.
Enable you to switch theme in Editor and Codeblock in Markdown Preview, I write how to make this feature in this article.
- Switching the theme at editor and code-block in markdow preview of Boostnote
- Users can choose their favorite theme.
①Installing the codemirror.
Since we mainly use React when making Boostnote, install the package using npm.
npm install codemirror --save
②Check the contents of the installed codemirror package.
Many kinds of themes are automatically installed.
They are the same as those here. https://github.com/codemirror/CodeMirror/tree/master/theme
- solarized light
That's all ;)
CodeMirror docs is here.
Enjoy CodeMirror and Boostnote!