如何从Codemirror XML模式获取元素的XPATH?

时间:2018-09-05 07:39:42

标签: javascript jquery codemirror codemirror-modes

我需要从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
    //}
}

0 个答案:

没有答案