我需要从codemirror文本编辑器获取xml标记的XPath。下面是我的codemirror配置。
var editor = CodeMirror.fromTextArea(document.getElementById("TextArea1"), { mode: "xml", lineNumbers: true, lineWrapping: true, matchBrackets: true, autoCloseTags: false, foldGutter: true, gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], extraKeys: { "Enter": completeAfter, //"'/'": completeIfAfterLt, "' '": completeIfInTag, //"'='": completeIfInTag, //"Ctrl-Space": "autocomplete", "Shift-Tab": "autoFormatSelection", }, matchTags: { bothTags: true }, //hintOptions: { // schemaInfo: tags //} }