高亮所有当前选中元素
This commit is contained in:
parent
ba3e91a6eb
commit
9f949f0ff4
|
@ -125,6 +125,12 @@ ul {
|
||||||
background-color: #D7D7D7;
|
background-color: #D7D7D7;
|
||||||
width: 100%
|
width: 100%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.CodeMirror-focused .cm-matchhighlight {
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
|
||||||
|
background-position: bottom;
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
/* end editor */
|
/* end editor */
|
||||||
|
|
||||||
/* start output */
|
/* start output */
|
||||||
|
|
|
@ -55,7 +55,7 @@ var editors = {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(".edit-header .tabs").on("dblclick", "div", function () {
|
$(".edit-header .tabs").on("dblclick", "div", function() {
|
||||||
editors.fullscreen();
|
editors.fullscreen();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -173,8 +173,13 @@ var editors = {
|
||||||
content: '<textarea id="editor' + id + '"></textarea>'
|
content: '<textarea id="editor' + id + '"></textarea>'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rulers = [];
|
||||||
|
rulers.push({color: "#ccc", column: 120, lineStyle: "dashed"});
|
||||||
|
|
||||||
var editor = CodeMirror.fromTextArea(document.getElementById("editor" + id), {
|
var editor = CodeMirror.fromTextArea(document.getElementById("editor" + id), {
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
|
highlightSelectionMatches: {showToken: /\w/},
|
||||||
|
rulers: rulers,
|
||||||
styleActiveLine: true,
|
styleActiveLine: true,
|
||||||
theme: 'lesser-dark',
|
theme: 'lesser-dark',
|
||||||
indentUnit: 4,
|
indentUnit: 4,
|
||||||
|
|
|
@ -97,6 +97,9 @@
|
||||||
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/hint/show-hint.js"></script>
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/hint/show-hint.js"></script>
|
||||||
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/hint/anyword-hint.js"></script>
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/hint/anyword-hint.js"></script>
|
||||||
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/display/fullscreen.js"></script>
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/display/fullscreen.js"></script>
|
||||||
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/display/rulers.js"></script>
|
||||||
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/search/searchcursor.js"></script>
|
||||||
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/search/match-highlighter.js"></script>
|
||||||
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/mode/go/go.js"></script>
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/mode/go/go.js"></script>
|
||||||
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/mode/xml/xml.js"></script>
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/mode/xml/xml.js"></script>
|
||||||
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/mode/htmlmixed/htmlmixed.js"></script>
|
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/mode/htmlmixed/htmlmixed.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue