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");
});