CodeMirror event

Time:2020-12-2

Because I want to use the markdwon module editor of UIKit, I contact codemirror
Here is the basic way to write event binding, which is close to jQuery

var textarea = document.getElementById('block');  
var editor = CodeMirror.fromTextArea(textarea, {  
    lineNumbers: false,  
    content: textarea.value,    
});  

editor.on("blur", function(){  
    console.log("onBlur");  
}); 

Recommended Today

Interviewer: young man, what do you think of the principle of distributed system

1 Concept 1.1 model 1.2 copies 1.3 indicators for measuring distributed systems 2. Principle of distributed system 2.1 data distribution 2.2 basic copy agreement 2.3 lease mechanism 2.4 quorum mechanism 2.5 log technology 2.6 two phase submission protocol 2.7 MVCC 2.8 Paxos protocol 2.9 CAP 1 Concept 1.1 model node In a specific project, a […]