zoukankan      html  css  js  c++  java
  • 百度编辑器UEditor配置toolbars工具条功能按钮

    两种方式:

    1、代码中定义

        <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>
    

     2、在“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']  
                ] 
    

     百度官方文档:

    http://fex.baidu.com/ueditor/

    http://ueditor.baidu.com/website/document.html

  • 相关阅读:
    非洲出现新蓝海,他们抓住机遇将产品加工反向送入国内市场
    npm ERR! code ERR_STREAM_WRITE_AFTER_END
    程序默认不自动重连oracle
    一份超详细的MySQL高性能优化实战总结
    佩奇送福利:Eygle系列书籍免费下载
    解决waiting for target deviceto come online的做法
    Android真机运行闪退问题
    他是如何将小店铺打造成餐饮品牌的?
    用两张图告诉你,为什么你的App会卡顿?
    用两张图告诉你,为什么你的App会卡顿?
  • 原文地址:https://www.cnblogs.com/bluealine/p/6924312.html
Copyright © 2011-2022 走看看