Syntax highlight using CodeMirror

Added by Troex Nevelin about 1 year ago

One of out users Alixon S made a CodeMirror plugin.

You can see the demo here


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.

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)