Skip to content Skip to sidebar Skip to footer

Codemirror Foldcode Method Not Working

I am trying to write an online editor and at the moment am trying to implement code folding. On the CodeMirror website they do a demo that uses the foldCode command that comes from

Solution 1:

You don't seem to be loading any actual folding functions. For JavaScript, you probably want addon/fold/brace-fold.js.

Solution 2:

Besides the other answers, add

editor.foldCode(CodeMirror.Pos(0, 0));

outside of your var editor

Solution 3:

change

foldgutter:true;

to

foldGutter:true;

Post a Comment for "Codemirror Foldcode Method Not Working"