ECSHOP如何安装百度编辑UEditor-ECShop

资源魔 73 0
ECSHOP零碎自带的编纂器各人用过都晓得,难用没有说,还不克不及批量上传图片。不少冤家都喜爱baidu编纂器,由于baidu编纂器性能弱小,应用不便,并且没有会天生太多过剩代码。

网上有许多ECSHOP整合baidu编纂器的教程,但年夜多都有一些成绩。

保举:《ecshop开发教程》

先看成果图:

48a613d548e9b56eaf946578a0ec6be.png

教程开端:

第一步:

先到baidu编纂器官网下载最新版,将文件夹更名为“ueditor”,上传到 /includes/ 目次下

(也能够正在本教程底手下载制造好的ueditor1.4.3版)

第二步:

关上这两个文件,一个是商品编纂,一个是文章编纂

/admin/templates/goods_info.htm
/admin/templates/article_info.htm

查找:

{$FCKeditor}

修正成:

<script type="text/javascript" charset="utf-8" src="../includes/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../includes/ueditor/ueditor.all.min.js"> </script>
<!--倡议手动加正在言语,防止正在ie下有时由于加载言语失败招致编纂器加载失败-->
<!--这里加载的言语文件会笼罩你正在设置装备摆设名目里增加的言语类型,比方你正在设置装备摆设名目里设置装备摆设的是英文,这里加载的中文,那最初就是中文-->
<script type="text/javascript" charset="utf-8" src="../includes/ueditor/lang/zh-cn/zh-cn.js"></script>
<style type="text/css">
.clear {
clear: both;
}
</style>
<textarea id="goods_desc" name="goods_desc" style="width:100%;height:500px;"> {$goods.goods_desc}</textarea>
<script type="text/javascript">
delete(Object.prototype.toJSONString);
UE.getEditor('goods_desc')
</script>

两个文件都这样修正。

留意这行代码:

<textarea id="goods_desc" name="goods_desc" style="width:100%;height:500px;"> {$goods.goods_desc}</textarea>

width以及height辨别是指编纂器的巨细,然而IE内核的阅读器,有可能没有支持写成px,以是编纂器的巨细可能有些没有完满,这是跟CSS无关,这个能够自行处理。

这个时分,其实ECSHOP后盾编纂器其实曾经能够失常应用了,只是进入商品列表、分类等等,会报错的,提醒短少Ajax:

7d75efd03062392eeaf0f6266cb18b9.png

上面接着提供处理办法

第三步:处理后盾js抵触

关上 /admin/templates/pageheader.htm

正在头部找到:

{insert_scripts files="../js/transport.js,co妹妹on.js,../js/utils.js"}

修正为:

<script type="text/javascript" src="../includes/ueditor/fix_jquery/jquery.min.js" rel="stylesheet" /></script>
<script type="text/javascript" src="../includes/ueditor/fix_jquery/jquery.json-1.3.js" rel="stylesheet" /></script>
<script type="text/javascript" src="js/co妹妹on.js" rel="stylesheet" /></script>
<script type="text/javascript" src="../includes/ueditor/fix_jquery/transport_json.js" rel="stylesheet" /></script>
{insert_scripts files="../js/utils.js"}

这样就能够了。

留意,没有要遗记了援用的JQ文件。。

以上就是ECSHOP若何装置baidu编纂UEditor的具体内容,更多请存眷资源魔其它相干文章!

标签: ECShop ecshop教程 ecshop自学 ecshop技术

抱歉,评论功能暂时关闭!