Yuki Takei 8 lat temu
rodzic
commit
031eaaa392
1 zmienionych plików z 6 dodań i 9 usunięć
  1. 6 9
      resource/js/components/PageEditor/Editor.js

+ 6 - 9
resource/js/components/PageEditor/Editor.js

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