Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught ReferenceError: CodeMirror is not defined

I am trying to include CodeMirror Plugin but am getting this error Uncaught ReferenceError: CodeMirror is not defined

My HTML CODE is here

http://pastie.org/4673008

Can anyone help ??

Thanks in advance..

like image 388
user1159517 Avatar asked Sep 06 '12 09:09

user1159517


1 Answers

You're loading the clike module before CodeMirror itself.

Change the order in your HTML head from this:

<script type="text/javascript" src="../CodeMirror-2.33/mode/clike/clike.js"></script>
<script type="text/javascript" src="../CodeMirror-2.33/lib/codemirror.js"></script>
<script type="text/javascript" src="../CodeMirror-2.33/mode/javascript/javascript.js"></script>

To this:

<script type="text/javascript" src="../CodeMirror-2.33/lib/codemirror.js"></script>
<script type="text/javascript" src="../CodeMirror-2.33/mode/clike/clike.js"></script>
<script type="text/javascript" src="../CodeMirror-2.33/mode/javascript/javascript.js"></script>
like image 124
Savjee Avatar answered Oct 27 '22 23:10

Savjee