我的知识记录

请问PbootCMS后台ueditor编辑器上传图片如何去掉自动添加的title和alt属性

  1. 修改 ueditor.all.min.js 文件

    • 打开 \core\extend\ueditor\ueditor.all.min.js 文件
    • 搜索 "imageUrlPrefix",找到以下代码: javascript   g.setAttribute("title", f.title || ""); g.setAttribute("alt", f.original || "");
    • 修改为: javascript   g.setAttribute("title", ""); g.setAttribute("alt", "");
    • 继续找到 g.removeAttribute("id"),在其后添加: javascript   g.removeAttribute("title");
  2. 增加版本号

    • 打开 \apps\admin\view\default\common\ueditor.html 文件
    • 找到 {CORE_DIR}/extend/ueditor/ueditor.all.min.js
    • 修改为: html   {CORE_DIR}/extend/ueditor/ueditor.all.min.js?v=1

标签:pbootcms插件-pboot cms-pbootcms新手入门教程-pbootcms模板-pbootcms利于优化吗-

更新时间:2025-04-10 23:49:48

上一篇:请问PbootCMS支持哪些PHP版本?

下一篇:请问PbootCMS列表页调用tag标签(1)_1