mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Match and fold tags
This commit is contained in:
parent
447e54d3af
commit
95dad1abc1
3 changed files with 9 additions and 0 deletions
|
@ -3,12 +3,19 @@
|
|||
|
||||
import * as CodeMirror from "codemirror/lib/codemirror";
|
||||
import "codemirror/mode/htmlmixed/htmlmixed";
|
||||
import "codemirror/addon/fold/foldcode";
|
||||
import "codemirror/addon/fold/foldgutter";
|
||||
import "codemirror/addon/fold/xml-fold";
|
||||
import "codemirror/addon/edit/matchtags.js";
|
||||
|
||||
const codeMirrorOptions = {
|
||||
mode: "htmlmixed",
|
||||
theme: "monokai",
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
foldGutter: true,
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
|
||||
matchTags: { bothTags: true },
|
||||
};
|
||||
|
||||
const parser = new DOMParser();
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
@import "ts/sass/codemirror/lib/codemirror";
|
||||
@import "ts/sass/codemirror/theme/monokai";
|
||||
@import "ts/sass/codemirror/addon/fold/foldgutter";
|
||||
|
||||
anki-editable {
|
||||
display: block;
|
||||
|
|
|
@ -7,6 +7,7 @@ vendor_js_lib(
|
|||
include = [
|
||||
"lib/codemirror.css",
|
||||
"theme",
|
||||
"addon/fold/foldgutter.css",
|
||||
],
|
||||
base = "external/npm/node_modules/codemirror/",
|
||||
pkg = pkg_from_name("codemirror"),
|
||||
|
|
Loading…
Reference in a new issue