TA的每日心情 | 开心 昨天 10:19 |
---|
签到天数: 187 天 [LV.7]常住居民III
管理员
  
- 积分
- 42929
|
大家都知道,帝国cms自带的后台编辑器实在有点不忍直射,今天春哥就写个教程,帮大家解脱一下,提高编辑效率才是王道。看看下面春哥操作成功的截图:
一、下载ueditor最新版,地址:http://ueditor.baidu.com/website/download.html
二、将下载的文件重命名为ueditor文件夹,直接上传到至帝国cms的/e/data/ecmseditor/下
三、按照下图操作:
输入表单替换html代码:
- <script type="text/javascript" src="/e/data/ecmseditor/ueditor/ueditor.config.js"></script> <script type="text/javascript" src="/e/data/ecmseditor/ueditor/ueditor.all.js"></script> <link rel="stylesheet" href="/e/data/ecmseditor/ueditor/themes/default/ueditor.css"> <script type="text/plain" id="myEditor" name="newstext"> <?=$ecmsfirstpost==1?"":stripSlashes($r[newstext])?> </script> <script type="text/javascript"> var editor = new baidu.editor.ui.Editor(); editor.render("myEditor"); editor.classid = <?=$classid?>; editor.filepass = <?=$filepass?>; </script> <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" 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%")?>
复制代码
至此,成功替换完成。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|