获取值:
// CodeMirror5 cm.getValue() 改为使用 // CodeMirror6 cm.state.doc.toString()
设置值:
// CodeMirror5 cm.setValue(text) 改为使用 // CodeMirror6 cm.dispatch({ changes: {from: 0, to: cm.state.doc.length, insert: text} })
Ref:https://codemirror.net/docs/migration/
Link:https://www.cnblogs.com/farwish/p/16951301.html
标签:EditorView,cm,text,FAQ,CodeMirror5,CodeMirror6 From: https://www.cnblogs.com/farwish/p/16951301.html