1.安装ckeditor:
下载ckeditor http://ckeditor.com/download 与 模块 http://drupal.org/project/ckeditor
将插件存放在模块的 modules/ckeditor/ckeditor/ 文件夹内。
进入后台模块列表,启用ckeditor, 进入用户管理,添加角色并分配其ckeditor权限。
进入站点设置-》ckeditor设置,点击Advanced的 edit 进行编辑,在basic setup下勾选刚才添加的角色保存。
ckeditor 配置完成。
2.添加syntax highligher
下载 syntaxhighligher http://alexgorbatchev.com/SyntaxHighlighter/ 与模块 http://drupal.org/project/syntaxhighlighter
将插件放在模块的 modules/syntaxhighlighter/ 下
进入后台开启 syntaxhighlighter, 配置选项勾选 需要开启的语言。
打开 modules/ckeditor/ckeditor.config.js, 添加:
config.extraPlugins += (config.extraPlugins ? ',syntaxhighlight' : 'syntaxhighlight' );