FCKeditor 在chrome中不顯示問題
網(wǎng)上有人說如下修改就可以,不過也要看你用的是什么系統(tǒng),程序員的水平就決定了兼容性問題,不過可以試試。
this.EnableSafari = true ; // This is a temporary property, while Safari support is under development.
把false修改為true之后顯示正常
應(yīng)該是chrome使用的內(nèi)核WebKit的問題,需要修改safari的支持
建議以后廣大程序員開發(fā)的時(shí)候要注意瀏覽器的兼容性問題。
fckeditor 沒顯示有問題
沒一點(diǎn)格式 參考下吧
<html>
<head>
<script src=/fckeditor/fckeditor.js"></script>
</head>
<body>
<form action="shou.jsp" method="post" target="_blank">
<script>
var editor = new FCKeditor('message');
editor.BasePath='/fckeditor/';
editor.Height=280;
editor.ToolbarSet='Default';
editor.Create();
</script>
<input type="submit" value="提交" name="button">
</form>
</body>
</html>
FCKeditor 沒顯示,出現(xiàn)空白頁面
路勁問題吧 在web.config 里面設(shè)置fck的相對(duì)路徑
<appSettings> <add key="FCKEditor:BasePath" value="/FCKeditor"/> <add key="FCKeditor:UserFilesPath" value="/UploadFiles/"/> </appSettings>
上面的是你Fck所在的相對(duì)路徑
下面的是fck上傳文件的文件夾路徑不過腳本之家今天弄得一個(gè)后臺(tái)由于是老板本,他使用了php判斷當(dāng)前瀏覽器與版本,chrome下編輯就不會(huì)出現(xiàn)的。需要修改一下函數(shù)就可以了。
原來的函數(shù)
function IsCompatible()
{
global $HTTP_USER_AGENT ;
if ( isset( $HTTP_USER_AGENT ) )
$sAgent = $HTTP_USER_AGENT ;
else
$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
{
$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
return ($iVersion >= 5.5) ;
}
else if ( strpos($sAgent, 'Gecko/') !== false )
{
$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
return ($iVersion >= 20030210) ;
}
else
return false ;
}
修改后的函數(shù)
function IsCompatible()
{
global $HTTP_USER_AGENT ;
if ( isset( $HTTP_USER_AGENT ) )
$sAgent = $HTTP_USER_AGENT ;
else
$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
{
$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
return ($iVersion >= 5.5) ;
}
else if ( strpos($sAgent, 'Gecko/') !== false )
{
$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
return ($iVersion >= 20030210) ;
}
else if ( strpos($sAgent, 'Chrome') !== false )
{
return 1;
}
else
return false ;
}
經(jīng)過測試這樣就正常顯示了,解決問題。還有個(gè)問題那就是chrome下獲取日期不能用getYear,需要用getFullYear(),但也有更好的解決方法,大家可以參考這篇文章。
相關(guān)文章
FCKeditor 2.6 編碼錯(cuò)誤導(dǎo)致修改的內(nèi)容出現(xiàn)亂碼的解決方法
我修改了該文件,其中有些中文字,在 IE 中打開之,發(fā)現(xiàn)是亂碼,原來這個(gè)文件有問題。文件中指定了 charset 為 utf-82010-03-03
Ewebeditor及fckeditork單引號(hào)問題的解決方法
為什么一個(gè)簡單的單引號(hào)會(huì)引發(fā)不能添加到數(shù)據(jù)庫呢,想到這里,我們想到了分析下入庫代碼并找出了原因,下面是解決方法。2010-04-04
FCKeditor 2.6.5 ASP環(huán)境安裝配置使用說明
今天用到在線編輯器在asp環(huán)境下上傳竟然無效。找了好久才找到這介紹,現(xiàn)備份于此,需要的朋友可以參考下2012-03-03
解決SyntaxHighlighter 代碼高亮不換行問題的解決方法
用SyntaxHighlighter 語法高亮插件的朋友可能都遇到過代碼顯示不換行的問題,這個(gè)問題在網(wǎng)上也找不到什么解決辦法,一直困擾了我很久,今天算是把它解決了,辦法其實(shí)簡單,下面說下如何解決2014-11-11

