Commit 079e6298 authored by Jérome Perrin's avatar Jérome Perrin

codemirror: enable matchtag addon

https://codemirror.net/demo/matchtags.html

makes editions of web pages and xml easier

/reviewed-on !634
parents 9bc5eb10 5fd6f245
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
<script type="text/javascript" src="&dtml-portal_url;/csslint.js"></script> <script type="text/javascript" src="&dtml-portal_url;/csslint.js"></script>
<script type="text/javascript" src="&dtml-portal_url;/codemirror/addon/lint/css-lint.js"></script> <script type="text/javascript" src="&dtml-portal_url;/codemirror/addon/lint/css-lint.js"></script>
<dtml-elif expr="mode == 'htmlmixed'"> <dtml-elif expr="mode == 'htmlmixed'">
<script type="text/javascript" src="&dtml-portal_url;/codemirror/addon/fold/xml-fold.js"></script>
<script type="text/javascript" src="&dtml-portal_url;/codemirror/addon/cm_edit/matchtags.js"></script>
<script type="text/javascript" src="&dtml-portal_url;/codemirror/mode/xml/xml.js"></script> <script type="text/javascript" src="&dtml-portal_url;/codemirror/mode/xml/xml.js"></script>
<script type="text/javascript" src="&dtml-portal_url;/codemirror/mode/javascript/javascript.js"></script> <script type="text/javascript" src="&dtml-portal_url;/codemirror/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="&dtml-portal_url;/codemirror/mode/css/css.js"></script> <script type="text/javascript" src="&dtml-portal_url;/codemirror/mode/css/css.js"></script>
...@@ -522,6 +524,7 @@ ...@@ -522,6 +524,7 @@
tabSize: 2, tabSize: 2,
indentWithTabs: false, indentWithTabs: false,
matchBrackets: true, matchBrackets: true,
matchTags: {bothTags: true},
extraKeys: extra_keys, extraKeys: extra_keys,
foldGutter: true, foldGutter: true,
lineWrapping: true, lineWrapping: true,
......
...@@ -7,6 +7,7 @@ rsvp.js ...@@ -7,6 +7,7 @@ rsvp.js
codemirror/lib/codemirror.js codemirror/lib/codemirror.js
codemirror/lib/codemirror.css codemirror/lib/codemirror.css
codemirror/addon/cm_edit/matchbrackets.js codemirror/addon/cm_edit/matchbrackets.js
codemirror/addon/cm_edit/matchtags.js
codemirror/addon/cm_edit/trailingspace.js codemirror/addon/cm_edit/trailingspace.js
codemirror/addon/dialog/dialog.css codemirror/addon/dialog/dialog.css
codemirror/addon/dialog/dialog.js codemirror/addon/dialog/dialog.js
...@@ -25,6 +26,7 @@ codemirror/addon/fold/foldcode.js ...@@ -25,6 +26,7 @@ codemirror/addon/fold/foldcode.js
codemirror/addon/fold/foldgutter.js codemirror/addon/fold/foldgutter.js
codemirror/addon/fold/indent-fold.js codemirror/addon/fold/indent-fold.js
codemirror/addon/fold/comment-fold.js codemirror/addon/fold/comment-fold.js
codemirror/addon/fold/xml-fold.js
codemirror/addon/merge/merge.css codemirror/addon/merge/merge.css
diff_match_patch/javascript/diff_match_patch_uncompressed.js diff_match_patch/javascript/diff_match_patch_uncompressed.js
codemirror/addon/merge/merge.js codemirror/addon/merge/merge.js
......
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
<script src="codemirror/addon/fold/foldgutter.js"></script> <script src="codemirror/addon/fold/foldgutter.js"></script>
<script src="codemirror/addon/fold/indent-fold.js"></script> <script src="codemirror/addon/fold/indent-fold.js"></script>
<script src="codemirror/addon/fold/comment-fold.js"></script> <script src="codemirror/addon/fold/comment-fold.js"></script>
<script src="codemirror/addon/fold/xml-fold.js"></script>
<script src="codemirror/addon/cm_edit/matchtags.js"></script>
<!-- Merge --> <!-- Merge -->
<link rel="stylesheet" href="codemirror/addon/merge/merge.css" /> <link rel="stylesheet" href="codemirror/addon/merge/merge.css" />
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
tabSize: 2, tabSize: 2,
indentWithTabs: false, indentWithTabs: false,
matchBrackets: true, matchBrackets: true,
matchTags: {bothTags: true},
rulers: [{ rulers: [{
column: 80, column: 80,
color: "#bbb", color: "#bbb",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment