定制工具欄圖標
UEditor 工具欄上的按鈕列表可以自定義配置,只需要通過修改配置項就可以實現需求
配置項修改說明
修改配置項的方法: 1. 方法一:修改 ueditor.config.js 里面的 toolbars 2. 方法二:實例化編輯器的時候傳入 toolbars 參數
var ue = UE.getEditor('container');
其他配置項:配置項說明
簡單列表
toolbars: [['fullscreen', 'source', 'undo', 'redo', 'bold']]
多行列表
toolbars: [['fullscreen', 'source', 'undo', 'redo'],['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript',
'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist',
'selectall', 'cleardoc']]
兩行的例子:
工具欄按鈕分割線
配置項里用豎線 '|' 代表分割線
完整的按鈕列表
toolbars: [['anchor', //錨點'undo', //撤銷'redo', //重做'bold', //加粗'indent', //首行縮進'snapscreen', //截圖'italic', //斜體'underline', //下划線'strikethrough',
//刪除線'subscript', //下標'fontborder', //字符邊框'superscript', //上標'formatmatch', //格式刷'source', //源代碼'blockquote', //引用'pasteplain', //純文本粘貼模式'selectall',
//全選'print', //打印'preview', //預覽'horizontal', //分隔線'removeformat', //清除格式'time', //時間'date', //日期'unlink', //取消鏈接'insertrow', //前插入行'insertcol',
//前插入列'mergeright', //右合並單元格'mergedown', //下合並單元格'deleterow', //刪除行'deletecol', //刪除列'splittorows', //拆分成行'splittocols', //拆分成列'splittocells',
//完全拆分單元格'deletecaption', //刪除表格標題'inserttitle', //插入標題'mergecells', //合並多個單元格'deletetable', //刪除表格'cleardoc', //清空文檔'insertparagraphbeforetable',
//"表格前插入行"'insertcode', //代碼語言'fontfamily', //字體'fontsize', //字號'paragraph', //段落格式'simpleupload', //單圖上傳'insertimage', //多圖上傳'edittable', //表格屬性'edittd',
//單元格屬性'link', //超鏈接'emotion'