• 微信
您当前的位置:首页  > 文章 >  帝国cms整合百度编辑器ueditor图文教程

帝国cms整合百度编辑器ueditor图文教程

作者:admin 时间:2019-10-19 阅读数:71人

一、UEditor简介

帝国cms自带文本编辑器是fckeditor,用起来效果不太理想。

百度也推出了自己的编辑器UEditor

UEditor是由WEB前端研发部开发的所见即所得的开源富文本编辑器,具有轻量、可定制、用户体验优秀等特点。开源基于BSD协议,所有源代码在协议允许范围内可自由修改和使用。百度UEditor的推出,可以帮助不少网站开者在开发富文本编辑器所遇到的难题,节约开发者因开发富文本编辑器所需要的大量时间,有效降低了企业的开发成本。

下边先来贴出几张相片浏览一下百度编辑器UEditor一些特色功能吧!

   帝国cms整合百度编辑器ueditor图文教程

帝国cms整合百度编辑器ueditor图文教程

 

帝国cms整合百度编辑器ueditor图文教程

帝国cms整合百度编辑器ueditor图文教程

帝国cms整合百度编辑器ueditor图文教程

 

二、帝国CMS6.6整合UEditor

1.根据自己cms的版本下载相应版本ueditor1.2.2_GBK.rar,ueditor1.2.2_utf8.rar

2.上传至帝国cms的/e/data/ecmseditor/下

3.修改字段输入表单,具体操作:系统-->新建表与系统模型-->管理数据表-->管理字段

如下图所示

帝国cms整合百度编辑器ueditor图文教程

帝国cms整合百度编辑器ueditor图文教程

帝国cms整合百度编辑器ueditor图文教程

 

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":""?>>
关键字替换&nbsp;&nbsp; <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>)&nbsp;&nbsp;
<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"> 图片链接转为下一页&nbsp;&nbsp; <input name="autopage" type="checkbox" id="autopage" value="1"> 自动分页
,每
<input name="autosize" type="text" id="autosize" value="5000" size="5">
个字节为一页&nbsp;&nbsp; 取第
<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>

声明

源码下载不顺利,比如源码在百度网盘的有时会被无故取消等,请联系QQ:46667551
本站大部分下载资源收集于网络,但除特别说明之外,基本全部亲自测试可用!
但由于某些源码的更新迭代,比如微信小程序官方接口的变动等原因,
如时间过长,可能会造成本可以使用的代码出现问题,下载前请斟酌!
本站资源仅供学习和交流使用,版权归原作者所有,请在下载后24小时之内自觉删除。
若作商业用途,请购买正版,由于未及时购买和付费发生的侵权行为,使用者自行承担,概与本站无关。

原文链接:https://www.dnwfb.com/124.html,转载请注明出处