ECShop 将FckEditor编辑器升级或更换成CKEditor
2013-07-11 10:12
309 查看
本人在二次开发ecshop 2.7.1引入了JQuery后FckEditor一直有问题,点击FckEditor上的功能按钮后只出现个"Cancel"按钮,其他都被"div"层履盖,只能刷新重来。最近有机会来做SEO优化,经常要发软文,有必要把FckEditor修复一下。
在网上搜了一下,发现FckEditor已经升级了,本文编辑时的版本是CKEditor 3.5.2。
下载CKEditor - CKEditor 3.5.2
解压文件至ECShop的includes中。
搜索ECShop的admin目录下的所有字符串"fckeditor"替换成"ckeditor","FCKEditor"替换成"CKEditor"。(注:大小写分开替换)
修改admin\includes\lib_main.php的function create_html_editor函数:
function create_html_editor($input_name, $input_value = '')
{
global $smarty;
//$editor = new CKeditor($input_name);
//$editor->BasePath = '../includes/ckeditor/';
//$editor->ToolbarSet = 'Normal';
//$editor->Width = '100%';
//$editor->Height = '320';
//$editor->Value = $input_value;
//$CKeditor = $editor->CreateHtml(); // 新版没有这个函数
$CKEditor = new CKEditor();
$CKEditor->returnOutput = true; // 这行一定要加不然下面的editor()会在页首直接输出ckeditor对象。
$code = $CKEditor->editor($input_name, $input_value);
$smarty->assign('CKeditor', $code);
}
还要修改admin\templates\article_info.htm的204~207 else代码段
else
{
tables[i].style.display = "none";
}
改成
else
{
var tblId = tables[i].id.match(/-table$/);
if (tblId == "-table")
{
tables[i].style.display = "none";
}
}
到此改版基本完成,对ckeditor也是刚刚接触,如果上面的方法有什么问题,可以留言告知!!!
在网上搜了一下,发现FckEditor已经升级了,本文编辑时的版本是CKEditor 3.5.2。
下载CKEditor - CKEditor 3.5.2
解压文件至ECShop的includes中。
搜索ECShop的admin目录下的所有字符串"fckeditor"替换成"ckeditor","FCKEditor"替换成"CKEditor"。(注:大小写分开替换)
修改admin\includes\lib_main.php的function create_html_editor函数:
function create_html_editor($input_name, $input_value = '')
{
global $smarty;
//$editor = new CKeditor($input_name);
//$editor->BasePath = '../includes/ckeditor/';
//$editor->ToolbarSet = 'Normal';
//$editor->Width = '100%';
//$editor->Height = '320';
//$editor->Value = $input_value;
//$CKeditor = $editor->CreateHtml(); // 新版没有这个函数
$CKEditor = new CKEditor();
$CKEditor->returnOutput = true; // 这行一定要加不然下面的editor()会在页首直接输出ckeditor对象。
$code = $CKEditor->editor($input_name, $input_value);
$smarty->assign('CKeditor', $code);
}
还要修改admin\templates\article_info.htm的204~207 else代码段
else
{
tables[i].style.display = "none";
}
改成
else
{
var tblId = tables[i].id.match(/-table$/);
if (tblId == "-table")
{
tables[i].style.display = "none";
}
}
到此改版基本完成,对ckeditor也是刚刚接触,如果上面的方法有什么问题,可以留言告知!!!
相关文章推荐
- ecshop更换升级FCKeditor编辑器到Kindeditor,支持图片批量上传,和百度地图添加
- Ecshop 编辑器 FCKeditor更换为Kindeditor 完整替换
- 将Ecshop后台fckeditor升级更改为kindeditor 4.1.10编辑器
- 将Ecshop后台fckeditor升级更改为kindeditor 4.1.10编辑器
- 升级phpcms的ckeditor编辑器
- 使用kindeditor来替换ecshop的fckeditor编辑器,让ecshop可以批量上传图片
- ecshop商品页增加编辑器fckeditor
- ecshop编辑器fckeditor换百度ueditor编辑器教程
- ecshop分类页把分类描述改成FCKeditor编辑器
- ECSHOP 商品编辑,详细描述 添加 FCKeditor编辑器
- ECshop将团购说明改成FCKeditor编辑器
- 从FCKEDITOR到ckeditor(一)----升级,使用,配置
- 更换ECSHOP默认编辑器为KindEditor
- ecshop编辑器fckeditor换百度ueditor编辑器教程
- 【Ecshop】将内置的 FCkeditor 更换为 UEditor
- ecshop将编辑器更换为kindeditor
- FCKeditor如何升级CKEditor及使用方法
- EMLOG更换KindEditor编辑器为CKEditor 4.4.5