TWCMS编辑器Ueditor超链接添加nofollow属性

发布时间 2023-08-20 15:51:46作者: 浅岛连云

打开ueditor目录再进入dialogs/link 目录,编辑link.html

<tr>

<td colspan="2">

<label for="target">

<var id="lang_input_target"></var>

</label>

input id="target" type="checkbox"/>

</td>

</tr>

之后添加

<tr>

<td colspan="2">

<label for="rel">添加nofollow</label>

<input id="rel" type="checkbox"></tr>

</td>

<tr>

接着在

$G("target").checked = url && link.target == "_blank" ? true :  false;

之后添加

$G("rel").checked = url && link.rel == "nofollow" ? true :  false;

最后在

'title' : $G("title").value.replace(/^\s+|\s+$/g, ''),

添加

'rel' : $G("rel").checked ? "nofollow" : '',