2011-05-25 10 views

उत्तर

10

ऐसा कुछ आपकी मदद करेगा।

कोड दर्पण

this.editor = CodeMirror.fromTextArea(document.getElementById("testAreaCodeMirror"), { 
    lineNumbers: true, 
    matchBrackets: true, 
    styleActiveLine: true, 
    theme:"eclipse", 
    mode:language 
}); 

स्थापित करने के लिए फिर CodeMirror 3 के बारे में क्या मोड

this.editor.setOption("mode", language); 
13

यदि यह कोडमिरर 2 या 3 है, तो setOption("mode", <new mode>) (setOption, "mode" के लिए दस्तावेज़) का उपयोग करें।

कोडमिरर 1 के लिए, setParser method का उपयोग करें।

+0

में परिवर्तित करने के लिए सबसे पहले? – zakdances

+0

संस्करण 2 के समान – Marijn

संबंधित मुद्दे