为感谢之前朋友们对我的帮助,热心回答我的问题,所以此教程免费放出,其实也没啥技术含量。
作为我用了这么久的微信排版编辑器来说,135是个好东西,样式多,美观。
本帖子写的方法只对文章模型有效,如果想将135编辑器添加到其他模型中,方法同此贴,只是要注意添加的路径要对,后面会提到。
*仅针对百度编辑器(Ueditor)
第一步:
将以下两个文件下载到电脑上之后,然后上传到系统的这个路径下:/public/plugins/Ueditor
文件一:http://www.135editor.com/js/ueditor/plugins/135editor.js
文件二:http://www.135editor.com/js/ueditor/dialogs/135editor/135EditorDialogPage.html
第二步:
在/public/plugins/Ueditor目录下,找到ueditor.config.js文件,然后搜索 toolbars: 在 'strikethrough', 之后添加上 '135editor', 如下图所示:
第三步-最后一步:
在/application/admin/template/article目录下,找到add.htm,并进行以下两步操作:
1)在 {load href="__PUBLIC__/plugins/Ueditor/ueditor.all.min.js" /} 下面添加一行代码 {load href="__PUBLIC__/plugins/Ueditor/135editor.js" /} 如下图所示:
2)添加CSS代码:
<style>
.edui-button.edui-for-135editor .edui-button-wrap .edui-button-body .edui-icon{
background-image: url("https://static.135editor.com/img/icons/editor-135-icon.png") !important;
background-size: 85%;
background-position: center;
background-repeat: no-repeat;
}
</style>
图示:
搞定,后台编辑器中就把135集成进来了。
在通过135排版完成之后,点击“完成编辑”时,如果浏览器弹出如下提示,直接点“离开”按钮即可
如果想将135集成到其他模型里去,就在后台目录/application/admin/template下找到对应模型的文件夹,然后重复执行上述方法的第三步即可。如:将135编辑器集成到视频模型中,那么路径为/application/admin/template/media/add.htm