帝國CMS編輯器怎麼替換為百度編輯器?
阿新 • • 發佈:2019-01-05
帝國的預設編輯器確實非常難用,今天墨魚做了一個教程就是用嘴簡單的方法來替換預設編輯器的方法!前臺投稿和後臺釋出同時支援!
先下載下面附件裡的編輯器(選擇你需要的編碼的編輯器),解壓進入資料夾把ueditor這個目錄上傳到帝國的外掛目錄裡即:(/e/extend/)
後臺--系統--資料表與系統模型--管理資料表找到你要使用編輯器的資料表。然後給需要更換編輯器的欄位替換程式碼:下面截圖是 文章模型的新聞正文欄位
替換這兩個表單的程式碼為以下程式碼.TXT裡的程式碼:
OK了 大功告成!
注意:如果改了後臺目錄請更改\ueditor\ueditor.toolbarconfig.js這個檔案內
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');
的路徑!
PS.如果不想用了想還原回帝國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%")?>