Code Editors
XML/HTML Mode
The XML mode supports two configuration parametershtmlMode
and alignCDATA
. To learn more visit here. To view more languages visit here
1
<html style="color: green"> <!-- this is a comment --> <head> <title>HTML Example</title> </head> <body> The indentation tries to be <em>somewhat "do what I mean"</em>... but might not match your style. </body></html>
Code Editor Theme
The code editor comes with different themes such as below. You can view more theme demos from the CodeMirror site by going here1
function findSequence(goal) { function find(start, history) { if (start == goal) return history; else if (start >goal) return null; else return find(start + 5, "(" + history + " + 5)") || find(start * 3, "(" + history + " * 3)"); } return find(1, "1");}
AutoFormatting Of Code
Select a piece of code and click one of the links below to apply automatic formatting to the selected text or comment/uncomment the selected text. Note that the formatting behavior depends on the current block's mode.x
1
function (s,e){ for(var i=0; i < 1; i++) test("test();a=1");}function test(c){ for (var i = 0; i < 10; i++){ process("a.b();c = null;", 300);}}
test 1 |
test 2 |