春哥 发表于 2016-5-24 16:51:52

帝国cms7.2整合百度编辑器ueditor最新版教程【春哥亲测可用】

大家都知道,帝国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)?></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==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?>">*高<input name="getfirsttitlespich" type="text" id="getfirsttitlespich" size="3" value="<?=$public_r?>">)</td></tr></table> 投稿表单替换html代码:
<?=ECMS_ShowEditorVar("newstext",$ecmsfirstpost==1?"":DoReqValue($mid,'newstext',stripSlashes($r)),"Default","","300","100%")?>
至此,成功替换完成。

页: [1]
查看完整版本: 帝国cms7.2整合百度编辑器ueditor最新版教程【春哥亲测可用】