Merge pull request #587 from pathmapper/matchingbrackets_addon

Add matchbrackets addon to JSON editor
This commit is contained in:
Orange Mug 2020-01-19 09:48:08 +00:00 committed by GitHub
commit f89f8ed4ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -17,7 +17,7 @@
}
.cm-s-maputnik .CodeMirror-cursor {
border-left: solid thin #8e8e8e !important;
border-left: solid thin #f0f0f0 !important;
}
.cm-s-maputnik.CodeMirror-focused div.CodeMirror-selected {
@ -47,5 +47,11 @@
}
.cm-s-maputnik .CodeMirror-matchingbracket {
text-decoration: underline; color: white !important;
background-color: #f0f0f0;
color: #565659 !important;
}
.cm-s-maputnik .CodeMirror-nonmatchingbracket {
background-color: #bb0000;
color: white !important;
}

View file

@ -7,6 +7,7 @@ import CodeMirror from 'codemirror';
import 'codemirror/mode/javascript/javascript'
import 'codemirror/addon/lint/lint'
import 'codemirror/addon/edit/matchbrackets'
import 'codemirror/lib/codemirror.css'
import 'codemirror/addon/lint/lint.css'
import '../../codemirror-maputnik.css'
@ -47,6 +48,7 @@ class JSONEditor extends React.Component {
viewportMargin: Infinity,
lineNumbers: true,
lint: true,
matchBrackets: true,
gutters: ["CodeMirror-lint-markers"],
scrollbarStyle: "null",
});