Syntax highlight using CodeMirror
Added by Troex Nevelin about 1 year ago
elrte-codemirror.png (76.3 kB)
Replies (3)
RE: Syntax highlight using CodeMirror
-
Added by Troex Nevelin about 1 year ago
Setup instructions¶
After including jquery, jquery-ui and elrte just add:
<!-- CodeMirror source hightlighter --> <script src="../codemirror/js/codemirror.js" type="text/javascript"></script> <script src="../elrte.codehightlight.js" type="text/javascript" charset="utf-8"></script>
You will need to edit elrte.codehighlight.js to set codemirror paths.
You can download ready version below.
elrte-1.2-codemirror.zip (752.1 kB)
elrte.codehighlight.js (1.4 kB)
RE: Syntax highlight using CodeMirror
-
Added by Steffan Schmidt 7 months ago
Hello,
Is there a way to highlight inserting code in the editor too? (and not only the preview html-code) I want to add this editor to my blog-software and I want to post sourcecode on my blog. It would be nice if the code were in different colors.
Or does somebody know a solution to post highlighting code with this editor?
Greetings
RE: Syntax highlight using CodeMirror
-
Added by Troex Nevelin 6 months ago
I'm not sure it will be an easy task, I would recommend some static code highlighters, there are lots of them, or using something like http://gist.github.com
(1-3/3)