標籤:
博主問題只是出在誤刪了style.js檔案
首先我用的是這種模式,在單個頁面上匯入:
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
然後直接把空間拖放到頁面上
<div> <CKEditor:CKEditorControl ID="txtContent" Height="400px" runat="server"></CKEditor:CKEditorControl></div>
出現的問題是IE瀏覽器,360相容模式都能正常顯示,但360極速模式顯示不了。
此時在極速模式點F12,發現產生的html是這樣
<textarea name="txtContent" rows="2" cols="20" id="txtContent" style="height: 400px; visibility: hidden;"></textarea>
而在相容模式點F12,發現產生的html是這樣
看這些代碼很顯然,在CKEditer架構中,hs將原本的textarea隱藏,然後換上了一堆html。
那麼問題就在於,為什麼相容模式下架構成功運行,極速模式架構沒有運行??
開啟極速模式的控制台,發現如下錯誤。
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:10808/項目名/ckeditor/styles.js?t=EAPE
Uncaught [CKEDITOR.resourceManager.load] Resource name "default" was not found at "http://localhost:10808/項目名/ckeditor/styles.js?t=EAPE". ckeditor.js?t=C6HH5UF:226
第一行:不贊成使用事件的傳回值,請使用標準的event.preventDefault()代替。這句聽語氣好像是警告,應該沒關係。
第二三行:沒有找到這個路徑,我查了一下,的確沒有styles.js這個檔案,這個檔案是根據網上教程精簡的時候刪掉的,把style.js重新拿回來。
問題解決了!!!
【CKEditor ASP.NET】解決360安全瀏覽器極速模式下不顯示