mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
dropdown
This commit is contained in:
parent
cf99026757
commit
3c9cc51af3
@ -9,14 +9,11 @@ CM.init = function() {
|
|||||||
CM.on = false;
|
CM.on = false;
|
||||||
} else {
|
} else {
|
||||||
CM.editor = CodeMirror.fromTextArea(document.getElementById('code'), {
|
CM.editor = CodeMirror.fromTextArea(document.getElementById('code'), {
|
||||||
mode: CM.mode, //$('#codemirror_mode').text(),
|
mode: CM.mode,
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
lineWrapping: true,
|
lineWrapping: true,
|
||||||
});
|
});
|
||||||
CM.on = true;
|
CM.on = true;
|
||||||
if (CM.mode == 'php') {
|
|
||||||
CM.mode = 'javascript';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -27,4 +24,9 @@ $(document).ready(function() {
|
|||||||
//$enable_codemirror.remove();
|
//$enable_codemirror.remove();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$langselect = $('#lang');
|
||||||
|
$langselect.change(function() {
|
||||||
|
CM.mode = $(this).val();
|
||||||
|
CM.init();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user