0
我有一個CKEditor 3.6實例正在運行。CKEditor IE8中的自動URL檢測
在IE 8,當我鍵入一個網址,說,www.yahoo.com,CKEditor的自動檢測到URL中鍵入並將其轉換成像一個超鏈接:
<a href="...">...</a>
我的問題是我我無法找到發生此轉換的來源/代碼。我如何在默認情況下將target="_blank"
添加到創建的所有超鏈接中?
我有一個CKEditor 3.6實例正在運行。CKEditor IE8中的自動URL檢測
在IE 8,當我鍵入一個網址,說,www.yahoo.com,CKEditor的自動檢測到URL中鍵入並將其轉換成像一個超鏈接:
<a href="...">...</a>
我的問題是我我無法找到發生此轉換的來源/代碼。我如何在默認情況下將target="_blank"
添加到創建的所有超鏈接中?
我用dataprocessors
CKEDITOR.replace('editor1', {
on: {
instanceReady: function() {
this.dataProcessor.htmlFilter.addRules({
elements: {
a: function(element) {
element.attributes.target = '_blank';
}
}
});
}
}
});
你可以只後處理的內容和保存例如在添加它固定它。 – Nenotlep