question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Themes and addons in CodeMirror

See original GitHub issue

I tried setting editor.setOption 'theme', 'blackboard' but the colors didn’t change. From the CodeMirror docs, it looks like I need to also manually include the relevant CSS (theme/blackboard.css). Similarly, add-on loading seems to be manually by including the relevant JavaScript. (With Ace, this inclusion was automatic.) Should I be adding <script> and <link> tags to my Meteor code to do this?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:26 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
edemainecommented, Jul 7, 2016

That helped, thanks! I added @5.14.2 to mizzao:sharejs-codemirror and forced an update with meteor update --allow-incompatible-update; then meteor crashed, but with a useful error message, pointing at Meteor package djedi:sanitize-html-client as the offender. Not sure exactly how that interacts with codemirror, but replacing that package with a modern npm dependency on sanitize-html caused everything to work!

0reactions
mshverncommented, Aug 6, 2018

Is there any way to actually apply a mode and theme to CodeMirror editor?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theme Demo - CodeMirror
Theme Demo ; 1. function findSequence(goal) { ; 2. function find(start, history) { ; 3. if (start == goal) ; 4. return history;...
Read more >
WP CodeMirror Themes – WordPress plugin
Navigate to 'Tools > CodeMirror Themes' and select a theme you like · Navigate to either 'Appearance > Editor' or 'Plugins > Editor' ......
Read more >
FarhadG/code-mirror-themes: A large collection of ... - GitHub
Once you have the desired CSS file, you simply configure your CodeMirror editor and pass in the theme's name as the CodeMirror theme...
Read more >
How to require mode, theme or addon of code mirror in ...
@import (inline) "./../../node_modules/codemirror/lib/codemirror.css"; @import (inline) "./../../node_modules/codemirror/theme/monokai.css ...
Read more >
How to Add The CodeMirror Editor to any WordPress Plugin or ...
That tweaking (and CodeMirror) is available in Appearance – Editor where you can edit theme files, in Plugins – Editor where you do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found