gpt4 book ai didi

php - 在 Laravel 5 中为 CKEditor 设置路由以与 CKFinder 一起工作

转载 作者:可可西里 更新时间:2023-10-31 23:38:11 25 4
gpt4 key购买 nike

你好,我正在尝试将 CKFinder 与 CKEditor 集成到一个 laravel 项目中。我在 CKEditor 的 config.js 文件中进行了以下设置:

CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
config.uiColor = '#ffffff';
config.removePlugins = 'forms, div, save, print, preview, newpage, _cut, bidi, showblocks, about, undo, redo, removeformat';


config.filebrowserBrowseUrl = 'kcfinder/browse.php?opener=ckeditor&type=files';
config.filebrowserImageBrowseUrl = 'kcfinder/browse.php?opener=ckeditor&type=images';
config.filebrowserFlashBrowseUrl = 'kcfinder/browse.php?opener=ckeditor&type=flash';
config.filebrowserUploadUrl = 'kcfinder/upload.php?opener=ckeditor&type=files';
config.filebrowserImageUploadUrl = 'kcfinder/upload.php?opener=ckeditor&type=images';
config.filebrowserFlashUploadUrl = 'kcfinder/upload.php?opener=ckeditor&type=flash';

};

然后我也开始获得 Browse Server 按钮。但我不知道为什么我无法访问它。我想我需要设置路由才能访问它,对吗?

这是我遇到的错误。

enter image description here

有什么建议我可以为此设置路线吗?

谢谢!

最佳答案

试试这个

CKEDITOR.replace( 'editor_ckf',    
{
filebrowserBrowseUrl: "{{ asset('ckfinder/ckfinder.html?Type=Files') }}",
filebrowserImageBrowseUrl: "{{ asset('ckfinder/ckfinder.html?Type=Images') }}",
filebrowserFlashBrowseUrl: "{{ asset('ckfinder/ckfinder.html?Type=Flash') }}",
filebrowserUploadUrl: "{{ asset('ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files') }}",
filebrowserImageUploadUrl: "{{ asset('ckfinder/core/connctor/php/connector.php?command=QuickUpload&type=Images') }}",
filebrowserFlashUploadUrl: "{{ asset('ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash') }}"
});

关于php - 在 Laravel 5 中为 CKEditor 设置路由以与 CKFinder 一起工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35240608/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com