http://www.hadsky.com/index.php?c=read&id=382&page=1
2,下载后,复制到本目录下
3,后台,应用,安装百度编辑器
4,为了更好的兼容乐天论坛,建议,关闭原来的PYT编辑器,从后台,应用那就可以关闭
5,优化百度编辑器显示的按钮:在后台,应用,点击百度编辑器,然后发帖样式,里面的代码。我修改的精简版代码如下
try {
var ue = UE.getEditor('container', {
toolbars: [
[
'undo', 'redo','horizontal','|','fontfamily','fontsize','bold', 'italic', 'underline','forecolor', 'backcolor','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','removeformat','formatmatch','link', 'unlink', '|', 'simpleupload', 'insertimage', 'emotion', 'insertvideo', 'attachment', 'map', 'inserttable',
]
],
autoFloatEnabled: false
});
$('#container').removeClass('pk-textarea pk-radius-4');
} catch (e) {}
6,修改完成后,测试编辑器,我们发现百度编辑器,发布的内容长了,没有滚动条,不能自动滚动。需要手动加入一个滚动条的代码,autoHeightEnabled: true
7,修改后的代码为:
try {
var ue = UE.getEditor('container', {
toolbars: [
[
'undo', 'redo','horizontal','|','fontfamily','fontsize','bold', 'italic', 'underline','forecolor', 'backcolor','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','removeformat','formatmatch','link', 'unlink', '|', 'simpleupload', 'insertimage', 'emotion', 'insertvideo', 'attachment', 'map', 'inserttable',
]
],
autoHeightEnabled: true
});
$('#container').removeClass('pk-textarea pk-radius-4');
} catch (e) {}
目前来看,已知的问题:
1,手机模式下,批量发图,不能自动缩放以适应屏幕,造成了手机模式下无法使用批量发图
2,发布内容后,再次编辑修改此内容下,编辑器里修改图片,点击图片时候有一个图片修改文字链接提示,通过这个链接提示点击进修改,保存后,在刷新,无反应。必须要先删除此图片,然后通过批量发图里面的在线管理,从新贴上图片,才有效。
大家可以测试用用,百度编辑器,还是不错的