您现在的位置是:首页 > 教程 > pbootcms教程pbootcms教程

pbootcms百度编辑器UEDITOR超链接添加rel="nofollow"

刘中舟2025-04-02 17:15:05pbootcms教程已有7人查阅

导读为了让 PbootCMS 的 UEditor 编辑器给超链接默认添加 rel="nofollow" 标签,你需要按照以下步骤进行修改。步骤 1: 修改 link.html 文件定位文件:找到 core/extend/ueditor/

为了让 PbootCMS 的 UEditor 编辑器给超链接默认添加 rel="nofollow" 标签,你需要按照以下步骤进行修改。
步骤 1: 修改 link.html 文件
定位文件:
找到 core/extend/ueditor/dialogs/link/link.html 文件。
修改第 81 行:
将原有的代码:
'href' : href, 'target' : $G("target").checked ? "_blank" : '_self', 'title' : $G("title").value.replace(/^\s+|\s+$/g, ''), '_href':href
修改为:
'href' : href, 'target' : $G("target").checked ? "_blank" : '_self', 'title' : $G("title").value.replace(/^\s+|\s+$/g, ''), 'rel': 'nofollow', '_href':href
步骤 2: 修改 ueditor.config.js 文件
定位文件:
找到 core/extend/ueditor/ueditor.config.js 文件。
修改第 370 行:
将原有的代码:
a: ['target', 'href', 'title', 'class', 'style','name','id'], abbr: ['title', 'class', 'style'], abbr: ['title', 'class', 'style'], area: ['shape', 'coords', 'href', 'alt'],
修改为:
a: ['target', 'href', 'title', 'class', 'style','name','rel','id'], abbr: ['title', 'class', 'style'], abbr: ['title', 'class', 'style'], area: ['shape', 'coords', 'href', 'alt'],

本文标签:

很赞哦! (0)

暂无内容
暂无内容
暂无内容
暂无内容
留言与评论 (共有 0 条评论)
昵称:
匿名发表 登录账号
         
验证码: