您的位置:首页 > 运维架构

OpenCart之CKEditor设置

2013-02-18 11:13 716 查看
OpenCart的1.5.4 – 1.5.5.1版本采用了CKEditor 4.0版本,有的用户会希望使用CKEditor的全部功能,而不是默认定制的,可以做如下修改:

更改config.js

config.js是 CKEditor 的主配置文件,更改config.js来定制自己的 CKEditor 样式:

CKEDITOR.editorConfig = function( config ) {

// Define changes to default configuration here.

// For the complete reference:

// http://docs.ckeditor.com/#!/api/CKEDITOR.config
config.filebrowserWindowWidth = ’800′;

config.filebrowserWindowHeight = ’500′;

config.resize_enabled = false;

config.htmlEncodeOutput = false;

config.entities = false;

config.extraPlugins = ‘codemirror’;

config.codemirror_theme = ‘rubyblue’;

config.toolbar = ‘Full’; // 工具栏风格(基础’Basic’、全能’Full’、自定义‘Custom’)

config.toolbar_Custom = [

['Source'],

['Maximize'],

['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],

['NumberedList','BulletedList','-','Outdent','Indent'],

['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],

['SpecialChar'],

‘/’,

['Undo','Redo'],

['Font','FontSize'],

['TextColor','BGColor'],

['Link','Unlink','Anchor'],

['Image','Table','HorizontalRule']

];

};

OpenCart技术交流QQ 1群:282797742

OpenCart技术交流QQ 2群:233273593
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息