使用带有elfinder的codemirror时,主题无效

时间:2017-05-19 09:59:38

标签: php codemirror elfinder

我正在使用elfinder和codemirror编辑器。当我使用codemirror主题而没有elfinder时它工作得很好。但是在elfinder主题中不起作用。这是我使用的代码:

$allEnumValues = [Some.Long.Namespace.I.Have.To.Repeat.Several.Times]
$someEnumValue = $allEnumValues::ValueXY
$anotherEnumValue = $allEnumValues::ValueYZ

我已经包含了所有neede css文件。请帮助为什么主题不起作用。

1 个答案:

答案 0 :(得分:0)

我正在解决这个问题。实际上问题出现在mimes.Now的代码是:

 $(document).ready(function() {
      $('#elfinder').elfinder({
       url: 'path of connector file'
     // add more options here
      commandsOptions: {
 edit: {

editors: [{
  mimes: [],
  load: function(textarea) {
    var mimeType = this.file.mime;
    return CodeMirror.fromTextArea(textarea, {
      mode: mimeType,
      lineNumbers: true,
      indentUnit: 4,
      theme: "dracula",
     styleActiveLine: true,
        matchBrackets: true,
    });
  },
  save: function(textarea, editor) {
    $(textarea).val(editor.getValue());
  }
    }]
    }
     }
        });
       });
相关问题