打開dedecm的后臺添加文檔的時候,發(fā)現(xiàn)竟然中國字體沒有?那么遇到這種情況我們應(yīng)該怎么辦呢?其實(shí)辦法很簡單DedeCMS5.7集成了ckedio網(wǎng)頁編輯器,它的原名是FCKedio,是一個非常優(yōu)秀的開源網(wǎng)頁編輯器,但二者的配置卻不......
以下是【金聰采編】分享的內(nèi)容全文:
以下是【金聰采編】分享的內(nèi)容全文:

打開include/ckeditor/ckeditor.js,搜索i.font_names,找到字體列表。添加所需的中文字體,添加后為:
i.font_names='Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif; 宋體/宋體;黑體/黑體;仿宋/仿宋_GB2312;楷體/楷體_GB2312;隸書/隸書;幼圓/幼圓;微軟雅黑/微軟雅黑'; |
需要特別注意的是:添加的字體,要寫成諸如“宋體/宋體”的形式,而不是“宋體”。即“顯示的字體名稱/實(shí)際字體名稱”的格式。 有的同學(xué)在添加完后發(fā)現(xiàn)后臺還是原來的樣子,沒有增加字體?。科婀衷趺椿厥履?? 這里要注意了,你更新了js后后臺調(diào)用的js他還有緩沖沒有更新,這時候你要把
<!-- 添加下面的代碼 --> <textarea name="body" rows="8" cols="60"></textarea><script type="text/javascript">//<![CDATA[window.CKEDITOR_BASEPATH='/include/ckeditor/';//]]></script><script type="text/javascript" src="/include/ckeditor/ckeditor.js?t=B8DJ5M3"></script><script type="text/javascript">//<![CDATA[CKEDITOR.replace('body', {"extraPlugins":"dedepage,multipic,addon","toolbar":[["Source","-","Templates"],["Cut","Copy","Paste","PasteText","PasteFromWord","-","Print"],["Undo","Redo","-","Find","Replace","-","SelectAll","RemoveFormat"],["ShowBlocks"],["Image","Flash","Addon"],["Maximize"],"/",["Bold","Italic","Underline","Strike","-"],["NumberedList","BulletedList","-","Outdent","Indent","Blockquote"],["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock"],["Table","HorizontalRule","Smiley","SpecialChar"],["Link","Unlink","Anchor"],"/",["Styles","Format","Font","FontSize"],["TextColor","BGColor","MyPage","MultiPic"]],"height":450,"skin":"kama"});//]]></script> |
這段代碼放到首頁更新下首頁,然后再把這段代碼去掉,這時候你到后臺就可以看到你添加的字體了。

侵權(quán)舉報/版權(quán)申訴



![[轉(zhuǎn)載]DedeCMS全站調(diào)用購物車數(shù)量顯示縮略圖](/d/file/c193b326fdf45961b69825fb4e8c9a4c.png)