随着越来越多的站长开始重视seo了,对rel=”nofollow”也在乎得多了。但是由于百度编辑器ueditor并不自带rel=”nofollow”功能,在引入其他站点URL链接的时候,就会导致蜘蛛流失,自己的网站权重下降。
今天AB模板网整理了一下,来教大家怎么改,让ueditor的link自带rel=”nofollow”标签,话不多说,直接上图。
1、找到/core/extend/ueditor/dialogs/link/link.html,修改第81行。

1
\’href\’ : href,
2
\’target\’ : $G(\”target\”).checked ? \”_blank\” : \’_self\’,
3
\’title\’ : $G(\”title\”).value.replace(/^\\s+|\\s+$/g, \’\’),
4
\’_href\’:href
修改成:
1
\’href\’ : href,
2
\’target\’ : $G(\”target\”).checked ? \”_blank\” : \’_self\’,
3
\’title\’ : $G(\”title\”).value.replace(/^\\s+|\\s+$/g, \’\’),
4
\’rel\’: \’nofollow\’,
5
\’_href\’:href
2、找到/core/extend/ueditor/ueditor.config.js,修改第370行。

1
a: [\’target\’, \’href\’, \’title\’, \’class\’, \’style\’,\’name\’,\’id\’],
2
abbr: [\’title\’, \’class\’, \’style\’],
3
abbr: [\’title\’, \’class\’, \’style\’],
4
area: [\’shape\’, \’coords\’, \’href\’, \’alt\’],
修改成:
1
a: [\’target\’, \’href\’, \’title\’, \’class\’, \’style\’,\’name\’,\’rel\’,\’id\’],
2
abbr: [\’title\’, \’class\’, \’style\’],
3
abbr: [\’title\’, \’class\’, \’style\’],
4
area: [\’shape\’, \’coords\’, \’href\’, \’alt\’],
上述两个文件修改好就可以实现rel=”nofollow”了,网站后台测试添加链接,测试成功,演示图如下。

本网站名称:创码者资源网
本站永久网址: http://www.cmzym.top/
本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
本站为非盈利网站,一切付费内容(包括但不限于会员充值,资源付费),均为用户自愿赞助,且所有资金均用于网站维护
本站资源均收录于互联网,所以不能保证每个细节都符合你的要求,也可能存在未知的BUG与瑕疵,因虚拟资源可复制特性,所以不接受任何理由的退款兑现,请阅 读本站声明和相关条款后再进行支付下载
本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长 :1326632303@qq.com 进行删除处理。
本本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可

















暂无评论内容