JSP页面使用富文本控件ckeditor自定义样式

转自:http://blog.csdn.net/guoquanyou/article/details/6798868

 

JSP页面使用富文本控件ckeditor自定义样式

分类: HTML+JavaScript Java   430人阅读  评论(0)  收藏  举报
 

ckeditor环境搭建 ,请参考  JSP中使用CKEditor3.6入门教程
JSP页面使用富文本控件ckeditor提交表单数据

JSP使用ckeditor和ckfinder实现富文本及上传功能

找到ckeditor目录下的ckeditor.js,修改其中的内容,向里面添加自己的设置

[html]  view plain copy
  1. CKEDITOR.editorConfig = function( config )  
  2. {  
  3.     // Define changes to default configuration here. For example:  
  4.     //config.language = 'fr'; //设置语言风格   fr法语  
  5.     config.uiColor = '#AADC6E';//修改边框颜色  
  6.          //设置宽高  
  7.     config.width = 700;  
  8.     config.height = 200;  
  9.     config.toolbar = 'MyToolbar';    
  10.     //config.toolbar = 'Full';    
  11.     //config.toolbar = 'Basic';    
  12.     config.toolbar_Full =     
  13.     [     
  14.         ['Source','-','Save','NewPage','Preview','-','Templates'],     
  15.         ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],     
  16.         ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],     
  17.         ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],     
  18.         '/',     
  19.         ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],     
  20.         ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],     
  21.         ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],     
  22.         ['BidiLtr', 'BidiRtl'],     
  23.         ['Link','Unlink','Anchor'],     
  24.         ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],     
  25.         '/',     
  26.         ['Styles','Format','Font','FontSize'],     
  27.         ['TextColor','BGColor'],     
  28.         ['Maximize', 'ShowBlocks','-','About']     
  29.     ];     
  30.   
  31.     config.toolbar_Basic =     
  32.     [     
  33.         ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']     
  34.     ];   
  35.     config.toolbar_MyToolbar =     
  36.     [     
  37.         ['NewPage','Preview'],     
  38.         ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Scayt'],     
  39.         ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],     
  40.         ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],     
  41.         '/',     
  42.         ['Styles','Format'],     
  43.         ['Bold','Italic','Strike'],     
  44.         ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],     
  45.         ['Link','Unlink','Anchor'],     
  46.         ['Maximize','-','About']     
  47.     ];     
  48. };  


效果图如下:

JSP页面使用富文本控件ckeditor自定义样式_第1张图片

 

你可能感兴趣的:(ckeditor)