POST TIME:2018-03-15 21:02
關(guān)于Fckeditor,大家并不陌生,多個互聯(lián)網(wǎng)軟件中都在使用它,它是一款非常強(qiáng)大的編輯器,近年來被站長使用火熱的Dedecms的默認(rèn)編輯器也是Fckeditor,關(guān)于修改和增加Fckeditor的功能問題,筆者已經(jīng)發(fā)過很多相關(guān)文章,如:給dedecms的fckeditor增加可運(yùn)行代碼功能。今天筆者要說的是如何修改“引用”的顯示樣式,就是,知道這一個功能如何修改,其它的您也就明白了。
因?yàn)樵赿edecms默認(rèn)的編輯器引用是表格樣式的,默認(rèn)底色為淺黃色(#FDFDDF),引用的標(biāo)題為紅色,名稱是“以下為引用的內(nèi)容”,可以說這是dedecms的一大標(biāo)志,如果別人訪問你的網(wǎng)站,看到這樣的引用樣式,就明白你用的是dedecms了。其實(shí)這都是次要的,最主要的是默認(rèn)的樣式與您的網(wǎng)站主題是否融洽的問題,以下就將修改的方法公布出來(高手請路過)。
分別是dedecms5.1和5.3的修改方法(強(qiáng)烈建議修改前進(jìn)行備份):
一。(1)打開dede安裝目錄下的include/FCKeditor/editor/js/fckeditorcode_ie_2.js (DedeCms5.1)
一。(2)打開dede安裝目錄下的include/FCKeditor/editor/js/fckeditorcode_id.js (DedeCms5.3)
二。(1)找到代碼:if(this.InsertHtml=='quote')
二。(2)找到代碼:FCKQuoteCommand.prototype.Execute=function(){
三。(1)將以下代碼改成你想的樣式(第四步有本人推薦的樣式)
var quoteString = "<table style='border-right: #cccccc 1px dotted; table-layout: fixed; border-top: #cccccc 1px dotted; border-left: #cccccc 1px dotted; border-bottom: #cccccc 1px dotted' cellspacing=0 cellpadding=6 width='95%' align=center border=0>rn"; quoteString += "<tr><td style='word-wrap: break-word' bgcolor='#fdfddf'>rn<font color='#FF0000'> </font><br>rn"; quoteString += "</td></tr></table>rn"; |
三。(2)將以下代碼改成你想的樣式(第四步有本人推薦的樣式)
var quoteString = "<table style='border-right: #cccccc 1px dotted; table-layout: fixed; border-top: #cccccc 1px dotted; border-left: #cccccc 1px dotted; border-bottom: #cccccc 1px dotted' cellspacing=0 cellpadding=6 width='95%' align=center border=0>rn"; quoteString += "<tr><td style='word-wrap: break-word' bgcolor='#fdfddf'>rn<font color='#FF0000'>以下為引用的內(nèi)容:</font><br>rn"; quoteString += "</td></tr></table>rn"; |
四。推薦的樣式(DIV+CSS,其中的顏色,自己修改就可以了)
var quoteString = "rn"; quoteString += "<div style='color:#636563;background-color:#f4efd4;font-size:12px;padding:10px;margin:0;border:#cccccc 1px dotted;'>rn<font color='#636563'> </font>rn"; quoteString += "</div>rn"; |
五。修改完畢,將修改的文件上傳至網(wǎng)站空間覆蓋原文件即可。如果打開編輯器插入的樣式?jīng)]有改變,清除IE緩存,再刷新就解決了。