|
|
@@ -49,9 +49,6 @@ export default class Editor extends React.Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
|
|
|
- // https://regex101.com/r/7BN2fR/2
|
|
|
- this.indentAndMarkPattern = /^([ \t]*)(?:>|\-|\+|\*|\d+\.) /;
|
|
|
-
|
|
|
this.interceptorManager = new InterceptorManager();
|
|
|
this.interceptorManager.addInterceptors([
|
|
|
new MarkdownListInterceptor(),
|
|
|
@@ -393,17 +390,17 @@ export default class Editor extends React.Component {
|
|
|
matchTags: {bothTags: true},
|
|
|
// folding
|
|
|
foldGutter: true,
|
|
|
- gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
|
|
|
+ gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'],
|
|
|
// match-highlighter, matchesonscrollbar, annotatescrollbar options
|
|
|
highlightSelectionMatches: {annotateScrollbar: true},
|
|
|
// markdown mode options
|
|
|
highlightFormatting: true,
|
|
|
// continuelist, indentlist
|
|
|
extraKeys: {
|
|
|
- "Enter": this.handleEnterKey,
|
|
|
- "Tab": "indentMore",
|
|
|
- "Shift-Tab": "indentLess",
|
|
|
- "Ctrl-Q": (cm) => { cm.foldCode(cm.getCursor()) },
|
|
|
+ 'Enter': this.handleEnterKey,
|
|
|
+ 'Tab': 'indentMore',
|
|
|
+ 'Shift-Tab': 'indentLess',
|
|
|
+ 'Ctrl-Q': (cm) => { cm.foldCode(cm.getCursor()) },
|
|
|
}
|
|
|
}}
|
|
|
onScroll={(editor, data) => {
|
|
|
@@ -427,7 +424,7 @@ export default class Editor extends React.Component {
|
|
|
</Dropzone>
|
|
|
|
|
|
<button type="button" className="btn btn-default btn-block btn-open-dropzone"
|
|
|
- onClick={() => {this.refs.dropzone.open()}}>
|
|
|
+ onClick={() => {this.refs.dropzone.open();}}>
|
|
|
|
|
|
<i className="icon-paper-clip" aria-hidden="true"></i>
|
|
|
Attach files by dragging & dropping,
|