ckeditor ckfinder怎么配置上传图片?

解决方案 »

  1.   


    有些配置必须要做:
    把文件夹中的bin目录下的dll文件添加到网站的引用中,防止出现找不到类的错误。
    打开config.php,修改function CheckAuthentication() { reture false;//改为return true; }此处修改是为了有权限上传。
    及上传的目录$baseUrl = ‘/newtp/Public/uploads/’;接下来就要把ckfinder集成到ckeditor中了,代码如下:
    var editor = CKEDITOR.replace('editor1'); 
    CKFinder.SetupCKEditor(editor, '/newtp/Public/Js/ckfinder')// ckfinder相对于总目录的路径;当然,在页面相应位置引用script代码是必不可少的。 补充:要自己配置eidtor的外观,可打开eidtor文件夹下的:config.js文件进行配置。
    CKEDITOR.editorConfig = function( config ){    
    // Define changes to default configuration here. For example:    
    // config.language = 'fr';    
    // config.uiColor = '#AADC6E';   
    // config.width = 200;};