I’d like to make a simple editor that turns on html, php, js and css syntaxes. I see that you can enable modes by including the js sources like
<script src="../mode/xml/xml.js"></script>
<script src="../addon/selection/active-line.js"></script>
But I also see that you have to enable them at the bottom of the document like
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
mode: "application/xml",
styleActiveLine: true,
lineNumbers: true,
lineWrapping: true
});
</script>
If it wanted to include multiple modes do I do something like
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
mode: "application/xml,**extramode1,extramode2,extramode3**",
styleActiveLine: true,
lineNumbers: true,
lineWrapping: true
});
</script>