This commit is contained in:
Claude 2012-04-23 14:08:37 +02:00
parent cf99026757
commit 3c9cc51af3

View File

@ -9,14 +9,11 @@ CM.init = function() {
CM.on = false;
} else {
CM.editor = CodeMirror.fromTextArea(document.getElementById('code'), {
mode: CM.mode, //$('#codemirror_mode').text(),
mode: CM.mode,
lineNumbers: true,
lineWrapping: true,
});
CM.on = true;
if (CM.mode == 'php') {
CM.mode = 'javascript';
}
}
};
@ -27,4 +24,9 @@ $(document).ready(function() {
//$enable_codemirror.remove();
return false;
});
$langselect = $('#lang');
$langselect.change(function() {
CM.mode = $(this).val();
CM.init();
});
});