帝国cms整合百度编辑器ueditor图文教程
UEditor是由WEB前端研发部开发的所见即所得的开源富文本编辑器,具备轻量、可定制、用户体验优良等特点。开源基于BSD协定,一切源代码在协定容许范围内可自由修正和利用。百度UEditor的推出,可能协助不少网站开者在开发富文本编辑器所遇到的难题,浪费开发者因开发富文本编辑器所需求的大量工夫,有效升高了企业的开发老本。
下边先来贴出几张相片阅读一下百度编辑器UEditor一些特征性能吧!
二、帝国CMS6.6整合UEditor
1.依据本人cms的版本下载相应版本ueditor1.2.2_GBK.rar,ueditor1.2.2_utf8.rar
2.上传至帝国cms的/e/data/ecmseditor/下
3.修正字段输入表单,详细操作:系统-->新建表与系统模型-->治理数据表-->治理字段
如下图所示
4.将下列代码复制入下图所示红框内
复制代码代码如下:
<script type="text/javascript" src="/e/data/ecmseditor/ueditor/editor_config_admin.js"></script>
<script type="text/javascript" src="/e/data/ecmseditor/ueditor/editor_all_min_admin.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>