UEditor配置toolbars工具条

技术文章 2014年8月11日 6.12K

ueditor配置工具条有两种方法

方法一:代码中定义

<script id=”container” name=”content” type=”text/plain”>这里写你的初始化内容</script>
<script type=”text/javascript”>
var editor = UE.getEditor(‘container’,{
//这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
toolbars:[[‘FullScreen’, ‘Source’, ‘Undo’, ‘Redo’,’bold’,’test’]],
//focus时自动清空初始化时的内容
autoClearinitialContent:true,
//关闭字数统计
wordCount:false,
//关闭elementPath
elementPathEnabled:false,
//默认的编辑区域高度
initialFrameHeight:300
//更多其他参数,请参考ueditor.config.js中的配置项
});
</script>

方法二:在“ueditor.config.js”文件中统一定义

toolbars:[
[‘fullscreen’, ‘source’, ‘|’, ‘undo’, ‘redo’, ‘|’,
‘bold’, ‘italic’, ‘underline’, ‘fontborder’, ‘strikethrough’, ‘superscript’, ‘subscript’, ‘removeformat’, ‘formatmatch’, ‘autotypeset’, ‘blockquote’, ‘pasteplain’, ‘|’, ‘forecolor’, ‘backcolor’, ‘insertorderedlist’, ‘insertunorderedlist’, ‘selectall’, ‘cleardoc’, ‘|’,
‘rowspacingtop’, ‘rowspacingbottom’, ‘lineheight’, ‘|’,
‘customstyle’, ‘paragraph’, ‘fontfamily’, ‘fontsize’, ‘|’,
‘directionalityltr’, ‘directionalityrtl’, ‘indent’, ‘|’,
‘justifyleft’, ‘justifycenter’, ‘justifyright’, ‘justifyjustify’, ‘|’, ‘touppercase’, ‘tolowercase’, ‘|’,
‘link’, ‘unlink’, ‘anchor’, ‘|’, ‘imagenone’, ‘imageleft’, ‘imageright’, ‘imagecenter’, ‘|’,
‘insertimage’, ’emotion’, ‘scrawl’, ‘insertvideo’, ‘music’, ‘attachment’, ‘map’, ‘gmap’, ‘insertframe’,’insertcode’, ‘webapp’, ‘pagebreak’, ‘template’, ‘background’, ‘|’,
‘horizontal’, ‘date’, ‘time’, ‘spechars’, ‘snapscreen’, ‘wordimage’, ‘|’,
‘inserttable’, ‘deletetable’, ‘insertparagraphbeforetable’, ‘insertrow’, ‘deleterow’, ‘insertcol’, ‘deletecol’, ‘mergecells’, ‘mergeright’, ‘mergedown’, ‘splittocells’, ‘splittorows’, ‘splittocols’, ‘charts’, ‘|’,
‘print’, ‘preview’, ‘searchreplace’, ‘help’, ‘drafts’]
]

特别强调以下若是想配置其它的内容不知道具体方法可以直接查看 ueditor.config.js 中里面注释很明确啦!


关注微信公众号『PHP学习网

第一时间了解最新网络动态
关注博主不迷路~

PHP学习网:站内收集的部分资源来源于网络,若侵犯了您的合法权益,请联系我们删除!
分享到:
赞(0)

文章评论

您需要之后才可以评论
0点赞 0评论 收藏 QQ分享 微博分享

PHP学习网

PHP学习网