You can actually make multiple calls to CodeMirror.fromTextArea
to 'Codemirror-ify' multiple textareas.
If you want multiple textareas with the same options, wrap the Codemirror.fromTextArea
call in a function, like:
function editor(id)
{
CodeMirror.fromTextArea(id, {
height: "350px",
parserfile: "parsexml.js",
stylesheet: "css/xmlcolors.css",
path: "js/",
continuousScanning: 500,
lineNumbers: true
});
}
You can then apply it to your textareas like:
editor('code1');
editor('code2');
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…