天天看點

CKEditor線上編輯器配置工具欄1.文本居中,居左設定2.CKEditor配置

1.文本居中,居左設定

方法一:重新下載下傳 CKEditor 選擇自定義配置下載下傳,在右側搜尋justify添加到左側,下載下傳即可。為友善大家,這裡直接給出自定義配置下載下傳連結 http://ckeditor.com/builder

方法二:直接在官方下載下傳justify插件,根據提示安裝,很簡單的,懶的寫了。下載下傳位址 http://ckeditor.com/addon/justify

2.CKEditor配置

  配置檔案config.js

  1. config.toolbar_Full =  
  2. [  
  3.     { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },  
  4.     { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },  
  5.     { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },  
  6.     { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',   
  7.         'HiddenField' ] },  
  8.     '/',  
  9.     { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },  
  10.     { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',  
  11.     '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },  
  12.     { name: 'links', items : [ 'Link','Unlink','Anchor' ] },  
  13.     { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },  
  14.     '/',  
  15.     { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },  
  16.     { name: 'colors', items : [ 'TextColor','BGColor' ] },  
  17.     { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }  
  18. ];  
CKEditor線上編輯器配置工具欄1.文本居中,居左設定2.CKEditor配置

參考部落格:

http://www.cnblogs.com/Setme/archive/2012/06/05/2536568.html

http://blog.csdn.net/hugh282003/article/details/21188623