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