CKEditor (Toolbar Definition)工具栏自定义配置
来源:互联网 发布:哪个运营商的4g网络好 编辑:程序博客网 时间:2024/06/06 18:13
CKEditor中的工具栏默认显示所有功能按钮。出于安全的原因、或者是简化的原因,需要对这个工具栏进行自定义设置。CKEditor工具栏自定义配置非常简单。
编辑ckeditor目录下的的config.js文件,默认的是下面的工具栏代码,
注意工具按钮是分组的,一个name内的大括号就是一个工具按钮分组,items后边是具体的按钮,“/”表示工具栏换行,“-”表示工具图标之间的中隔线“|”
(特别说明:config.js中没有下面的代码,默认就是显示全部按钮,但如果对工具栏进行自定义,最好的办法还是把下面的代码全部复制到config.js,然后再删除一个个不需要的按钮)
config.toolbar = 'Full'; 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' ] }]; config.toolbar_Basic =[ ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']];
下面是经删除过后的工具条代码
config.toolbar = 'Full'; config.toolbar_Full = [ {name: 'document',items: ['Source', '-', 'DocProps', 'Preview', 'Print', '-']}, {name: 'clipboard',items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo']}, {name: 'editing',items: ['Find', 'Replace', '-', 'SelectAll', '-']}, { 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']}, '/', { name: 'styles',items: ['Styles', 'Format', 'Font', 'FontSize']}, { name: 'colors',items: ['TextColor', 'BGColor']}, { name: 'tools',items: [ 'ShowBlocks', '-']} ]; config.toolbar_Basic = [['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', '-', 'About']];
工具栏的定义英汉对照说明:
Source = 源码模式
-
Save = 保存(提交表单)
NewPage = 新建
Preview = 预览
- = 分割线
Templates = 模板
Cut = 剪切
Copy = 复制
Paste = 粘贴
PasteText = 粘贴为无格式文本
PasteFromWord = 从 MS WORD 粘贴
-
Print = 打印
SpellChecker = 拼写检查
Scayt = 即时拼写检查
Undo = 撤销
Redo = 重做
-
Find = 查找
Replace = 替换
-
SelectAll = 全选
RemoveFormat = 清除格式
Form = 表单
Checkbox = 复选框
Radio = 单选框
TextField = 单行文本
Textarea = 多行文本
Select = 列表/菜单
Button = 按钮
ImageButton = 图片按钮
HiddenField = 隐藏域
/
Bold = 加粗
Italic = 倾斜
Underline = 下划线
Strike = 删除线
-
Subscript = 下标
Superscript = 上标
NumberedList = 编号列表
BulletedList = 项目列表
-
Outdent = 减少缩进量
Indent = 增加缩进量
Blockquote = 块引用
CreateDiv = 创建DIV容器
JustifyLeft = 左对齐
JustifyCenter = 居中
JustifyRight = 右对齐
JustifyBlock = 两端对齐
BidiLtr = 文字方向从左到右
BidiRtl = 文字方向从右到左
Link = 插入/编辑超链接(上传文件)
Unlink = 取消超链接
Anchor = 插入/编辑锚点链接
Image = 图像(上传)
Flash = 动画(上传)
Table = 表格
HorizontalRule = 插入水平线
Smiley = 插入表情
SpecialChar = 插入特殊符号
PageBreak = 插入分页符
/
Styles = 样式快捷方式
Format = 文本格式
Font = 字体
FontSize = 文字大小
TextColor = 文字颜色
BGColor = 背景颜色
Maximize = 全屏编辑模式
ShowBlocks = 显示区块
-
About = 显示关于
- CKEditor (Toolbar Definition)工具栏自定义配置
- CKEditor工具栏自定义配置
- 自定义ckeditor工具栏
- CKEditor 自定义 ToolBar 按钮
- ckeditor工具栏配置
- ckeditor 工具栏配置
- ckeditor 工具栏配置
- CKEditor在线编辑器配置工具栏
- CKEditor在线编辑器配置工具栏
- MFC 工具栏 Toolbar 自定义 位图
- MFC 工具栏 Toolbar 自定义 位图
- iOS自定义工具栏(Toolbar)
- 富文本 工具栏自定义 CKEditor 和 UEditor
- MFC 工具栏 Toolbar 自定义 位图 Bitmap
- MFC 工具栏 Toolbar 自定义 位图 Bitmap
- 自定义工具栏 (ToolBar) 控件的外观
- MFC 工具栏 Toolbar 自定义 位图 Bitmap
- Ckeditor-自定义配置 分组
- Android学习——简单的Button按钮
- python的id()函数
- Qt经典出错信息之undefined reference to `vtable for classname
- 在java中怎么样取得一周内的所有日期
- Win7 64位系统安装OpenCV2.3,并在VS2010中配置(下)
- CKEditor (Toolbar Definition)工具栏自定义配置
- hdu2045
- RMAN Configure Format
- 按日期、时间或大小生成log文件的log4j配置方案
- matlab保存figure中的图片去掉白边
- 关于 sudo 在aix 上的 安装 配置
- 在mini2440上移植minicom
- C语言"#","#@"和"##"在宏定义中的使用技巧
- MyEclipse中如何去掉JS或JSP语法错误提示