帝國默認編輯器確實非常難用,今天武林網做了一個教程用最簡單的方法來替換默認編輯器的方法!
同時支持前臺投稿和后臺發布!
效果演示

下載百度編輯器ueditor,將ueditor解壓到后上傳到帝國的插件目錄里即:(/e/extend/)
下載地址:百度編輯器UEditor 1.4.3 UTF-8下載
下載地址:百度編輯器UEditor 1.4.3 GBK下載
位置:后臺>系統》數據表與系統模型>管理數據表,找到你要使用編輯器的數據表。
然后給需要更換編輯器的字段替換代碼:下面截圖是文章模型的新聞正文字段newstext,

替換這兩個表單的代碼為以下代碼.TXT里的代碼:
OK了 大功告成!
注意:如果改了后臺目錄請更改/ueditor/ueditor.toolbarconfig.js這個文件內admin為你的登錄路徑
window.open('/e/admin/ecmseditor/FileMain.php?type=1&classid='+classid+'&infoid='+infoid+'&filepass='+filepass+'&sinfo=1&doing=1'+ehash,'','width=700,height=550,scrollbars=yes');
tips:如果不想用了想還原回帝國CMS默認編輯器,只需要在輸入表單替換html代碼這里填入下面的代碼:
- <?=ECMS_ShowEditorVar("newstext",$ecmsfirstpost==1?"":stripSlashes($r[newstext]),"Default","","300","100%")?>
- <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
- <tr>
- <td bgcolor="#FFFFFF"> <input name="dokey" type="checkbox" value="1"<?=$r[dokey]==1?' checked':''?>>
- 關鍵字替換 <input name="copyimg" type="checkbox" id="copyimg" value="1">
- 遠程保存圖片(
- <input name="mark" type="checkbox" id="mark" value="1">
- <a href="SetEnews.php?<?=$ecms_hashur[ehref]?>&" target="_blank">加水印</a>)
- <input name="copyflash" type="checkbox" id="copyflash" value="1">
- 遠程保存FLASH(地址前綴:
- <input name="qz_url" type="text" id="qz_url" size="">
- )</td>
- </tr>
- <tr>
- <td bgcolor="#FFFFFF"><input name="repimgnexturl" type="checkbox" id="repimgnexturl" value="1"> 圖片鏈接轉為下一頁 <input name="autopage" type="checkbox" id="autopage" value="1"> 自動分頁
- ,每
- <input name="autosize" type="text" id="autosize" value="5000" size="5">
- 個字節為一頁 取第
- <input name="getfirsttitlepic" type="text" id="getfirsttitlepic" value="" size="1">
- 張上傳圖為標題圖片(
- <input name="getfirsttitlespic" type="checkbox" id="getfirsttitlespic" value="1">
- 縮略圖: 寬
- <input name="getfirsttitlespicw" type="text" id="getfirsttitlespicw" size="3" value="<?=$public_r[spicwidth]?>">
- *高
- <input name="getfirsttitlespich" type="text" id="getfirsttitlespich" size="3" value="<?=$public_r[spicheight]?>">
- )</td>
- </tr>
- </table>
投稿表單替換html代碼如下:
- <?=ECMS_ShowEditorVar("newstext",$ecmsfirstpost==1?"":DoReqValue($mid,'newstext',stripSlashes($r[newstext])),"Default","","300","100%")?>