首页 > 解决方案 > 错误:在 Angularjs 中加载定义时 [CKEDITOR.dialog.openDialog] 对话框图像失败

问题描述

仅在生产中,当我尝试在 CKEditor 中插入图像时出现错误:

[CKEDITOR.dialog.openDialog] 加载定义时对话框图像失败

当我尝试添加表格时,我得到:

[CKEDITOR.dialog.openDialog] 加载定义时对话框表失败。

编辑器的其他选项正常工作,bower.json 中的版本是:"ckeditor": "#full/4.5.4",

我的工具栏配置是:

    $ckEditorProvider.setDefaults({
          toolbar: [
            {
              name: 'editing',
              items: ['Find', 'Replace', '-', 'SelectAll', '-', 'Scayt', '-']
            },
            {
              name: 'insert',
              items: ['Image','Table']
            },
            '/',
            {
              name: 'styles',
              items: ['Bold', 'Italic', 'Underline', 'Styles', 'Format', 'Font', 'FontSize']
            }
          ]
        });

    CKEDITOR.basePath = location.href.substr(0, location.href.indexOf(location.hash)) + 'bower_components/ckeditor/';
    CKEDITOR.plugins.basePath = location.href.substr(0, location.href.indexOf(location.hash)) + 'bower_components/ckeditor/plugins';
}

有谁知道为什么会这样?

标签: angularjsckeditor

解决方案


推荐阅读