升级改造eyoucms投稿编辑器
作者:admin 分类:eyoucms使用教程 时间:2023-04-16 浏览:
很多用户反映默认的投稿编辑太简单

改造后效果如下:

今天就发布升级改造的教程,教程如下:
前提:先打开百度编辑器的官网 http://fex.baidu.com/ueditor/#start-toolbar
1、找到第二套会员中心的投稿字段文件,并在编辑器里打开。
/public/static/template/users_v2/users_release_field.htm
2、在文件里搜索这个字符:htmltext ,将会定位到编辑器代码的位置,在里面加上css样式,将百度工具栏的高度设置自动。
<style type="text/css">
.ey-container .ey-con .ey-con-forms .edui-default .edui-editor-toolbarboxinner {
height: auto;
}
</style>

3、
搜索:toolbars,将原来的字段修改成截图所示。具体的图标可以参考百度编辑器官方的说明,可以自己适当增减。切记注意格式
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', '|', 'simpleupload', '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', 'drafts', 'help','previewmobile' ]],
4、打开这个文件 public/static/common/js/tag_global.js 和上面的文件修改方法一样。
5、改成之后,强制刷新一下浏览器,让JS立马生效。
最后的修改成品如下

文章链接:https://eyhtml.com/xinwendongtai/395.html
文章标题:升级改造eyoucms投稿编辑器
文章版权:所发布的内容,部分为原创文章,转载请注明来源,网络转载文章如有侵权请联系我们!
本文最后更新发布于
文章标题:升级改造eyoucms投稿编辑器
文章版权:所发布的内容,部分为原创文章,转载请注明来源,网络转载文章如有侵权请联系我们!
本文最后更新发布于
2023-04-16


