我在symfony项目中使用IvoryCKEditorBundle没有任何问题。
但是我尝试将FMElfinderBundle添加到IvoryCKEditorBundle。我在控制台中看到一个包含错误的空白页:
我的代码:
#app/config/config.yml
# FMElfinderBundle Configuration
fm_elfinder:
instances:
ckeditor:
locale: %locale% # defaults to current request locale
editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple
fullscreen: true # defaults true, applies to simple and ckeditor editors
theme: smoothness # jquery theme
include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
connector:
debug: false # defaults to false
roots: # at least one root must be defined
uploads:
show_hidden: false # defaults to false
driver: LocalFileSystem
path: uploads
upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
upload_deny: ['all']
upload_max_size: 2M
# IvoryCKEditorBundle Configuration
ivory_ck_editor:
default_config: my_custom_config
configs:
my_custom_config:
toolbar: full
filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters:
instance: ckeditor
任何帮助?感谢
答案 0 :(得分:1)
这是我的配置。也许有帮助:
fm_elfinder:
instances:
default:
locale: %default_locale% # defaults to current request locale
editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple
fullscreen: true # defaults true, applies to simple and ckeditor editors
theme: smoothness # jquery theme
include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
connector:
debug: false # defaults to false
roots: # at least one root must be defined
uploads:
show_hidden: false # defaults to false
driver: LocalFileSystem
path: uploads/content
upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
upload_deny: ['all']
upload_max_size: 20M
ivory_ck_editor:
configs:
my_config:
removePlugins: 'flash,print,forms,div,newpage'
allowedContent: true
entities: false
autoParagraph: false
protectedSource: ['/<span[^>]*><\/span>/g', '/<i[^>]*><\/i>/g']
答案 1 :(得分:0)
似乎elfinder资产未正确转储,请检查web根目录下的assets文件夹。还要检查您的作曲家文件是否包含
{
"config": {
"component-dir": "web/assets"
}
}
此部分告诉组件安装程序复制web / assets目录下的资产。