const yamlCodeMirrorEle = document.getElementById('el');
this.myCodeMirror = CodeMirror(yamlCodeMirrorEle, {
value: '',
mode: 'yaml',
lineNumbers: true, // Show row count
indentUnit: 1, // Indentation unit is 2
styleActiveLine: true, // The background of the current line is highlighted
matchBrackets: true, // Bracket matching
lineWrapping: true, // Automatic line wrap
tabSize: 2,
});
// Listen to the input value changes
this.myCodeMirror.on('change', (cm) => {
console.log(eidtorText: cm.doc.getValue())
})
// Switch configuration method
// ('mode', 'javascript')