ECSHOP商城自带的编辑器实在是不能忍,太难用了。

就换成了百度的ueditor编辑器,本来最近修改了几个商城的,索性自己也记录一次吧。

用的ueditor最新版本1.4.3.3完美支持远程图片本地化,网上有人也是同样的方法,但是对本地化支持是不完善的。

下载百度编辑器:ueditor官网

我提供的整合包:ueditor1_4_3_3

开始先备份自己需要修改的文件,在admin/templates目录下的

article_info.htm

goods_info.htm

pageheader.htm

开始修改:

article_info.htm和goods_info.htm文件里面的:{$FCKeditor}这一句

修改成:

<!–编辑器–>
<tr>
<td>
<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>
<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>
</td>
</tr><!–编辑器–>

然后修改:

pageheader.htm文件,把里面调用的js代码换了

把这一句{insert_scripts files=”../js/transport.js,common.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/common.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”}

然后把我提供的fx_jquery文件夹放到ueditor去就行了。这个是解决Ajax object doesn’t exists冲突提示。

当然如果你是直接下载我提供的整合包,就不用上面这一步了。