mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
19 lines
398 B
JavaScript
19 lines
398 B
JavaScript
var CM = window.CM || {}
|
|
|
|
CM.init = function() {
|
|
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
|
|
mode: $('#codemirror_mode').text(),
|
|
lineNumbers: true,
|
|
lineWrapping: true,
|
|
});
|
|
};
|
|
|
|
$(document).ready(function() {
|
|
$enable_codemirror = $('#enable_codemirror');
|
|
$enable_codemirror.click(function() {
|
|
CM.init();
|
|
$enable_codemirror.remove();
|
|
return false;
|
|
});
|
|
});
|