首先当然是先去下载这两样东西:

http://ckeditor.com/

http://ckfinder.com/

 

 1.开始配置

 

1.1把ckeditor解压.放到网站的目录下面.

 

1.2 把下载的ckfinder 放在刚才的 ckeditor 的根目录下面

 

1.2.1 先配置ckfinder 吧.

 

打开ckfinder目录.找到 config.ascx

修改public override bool CheckAuthentication()方法.这是用来验证用户是否登录的.下面是return false;. 你按照自己的业务修改一下

比如( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );

找到ckfinder.js(这是用来修改 文件上传以后,文件存放的位置)

默认是:CKFinder.DEFAULT_BASEPATH = '/ckfinder/' ;

 

1.2.2 配置 ckeditor

 

打开 ckeditor目录下面的config.js文件

下面是我的配置

=Flash';
config.filebrowserWindowWidth = '800';
config.filebrowserWindowHeight = '500';

//工具栏
config.toolbar = [
['Source','-','Preview','-','Templates'],  
   ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], 
       ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],   
         ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],  
                 ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],   
              ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],    
               ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],     ['Link','Unlink','Anchor'],    
                ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],   
                    ['Styles','Format','Font','FontSize'],    
                   ['TextColor','BGColor'],    
                    ['Maximize', 'ShowBlocks','-'] ];

};

 

为了减少编辑器的大小,可以删除一些不必要的文件,如把_samples、_source、_tests三个文件夹删除,进入lang文件目录,保留en.js、zh.js、zh-cn.js三个文件,其余的语言文件如果你用不到,可以删除。

 

 2.调用

 


 

 

 差不多了.试验一下吧

 附加: /Files/sera/ckeditor文档.rar 这个配置文档是Google大神翻译的.有一些看起来有点难度

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2021-10-19
  • 2021-06-16
  • 2021-08-22
  • 2022-12-23
  • 2021-10-23
猜你喜欢
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2021-10-28
相关资源
相似解决方案