简介:本插件为百度UEditor编辑器开发,专为Destoon B2B系统V6及V7.0设计,支持将Word文档中的图片直接转换并保存至网站服务器,提升内容发布效率。
为了在后台网站设置中使用UEditor插件,请按照以下步骤操作:
一、选择UEditor作为编辑器。
二、对文件member\editor\ueditor\ueditor.config.js进行如下改动:
1. 在第366行,将 `a: [target, href, title, class, style]` 更改为 `a: [target, href, title, class, style, name]`
2. 在第403行,将 `img: [src, alt, title, width, height, id, _src, loadingclass, class, data-latex]` 修改为 `img: [src, alt, title, width,height,id,_src ,loadingclass,class,data-latex ,anchorname ,word_img ,style ]`
三、编辑文件member\editor\ueditor\init.inc.php:
1. 注释掉第25行的代码,即 `$editor .= serverUrl:UPPath+?from=editor&moduleid;=.$moduleid.`
2. 搜索并替换 fullscreen 为 fullscreen, wordimage
3. 这样可以增加一个“转存”按钮。
四、将百度编辑器UEditor目录中的PHP文件复制到系统对应位置:
1. 确保member\editor\ueditor\php\controller.php 可访问。
2. 编辑 controller.php 文件的第4行,把 Chongqing 的首字母改为大写。
五、修改图片上传保存路径:
1. 更改文件 php/config.json 中的相关设置
- 在第 11 行将 imageUrlPrefix 替换为绝对路径,即你的网站首页地址。
- 第 12 行更改为 `imagePathFormat: /file/upload/{yyyy}{mm}/{dd}/{time}{rand:2}` 来确保图片保存路径与原系统保持一致。
完成以上步骤后,请点击后台系统的更新所有缓存,并使用Ctrl+F5强制刷新以应用更改。