1.文本居中,居左設定
方法一:重新下載下傳 CKEditor 選擇自定義配置下載下傳,在右側搜尋justify添加到左側,下載下傳即可。為友善大家,這裡直接給出自定義配置下載下傳連結 http://ckeditor.com/builder
方法二:直接在官方下載下傳justify插件,根據提示安裝,很簡單的,懶的寫了。下載下傳位址 http://ckeditor.com/addon/justify
2.CKEditor配置
配置檔案config.js
- config.toolbar_Full =
- [
- { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
- { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
- { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
- { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',
- 'HiddenField' ] },
- '/',
- { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
- { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
- '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
- { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
- { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
- '/',
- { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
- { name: 'colors', items : [ 'TextColor','BGColor' ] },
- { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
- ];

參考部落格:
http://www.cnblogs.com/Setme/archive/2012/06/05/2536568.html
http://blog.csdn.net/hugh282003/article/details/21188623