dedecms安装kindeditor编辑器
2018-01-10 10:48
344 查看
1、将 kindeditor(我的版本:kindeditor-4.1.7,删除多余不使用的文件或目录,适当精简一下)解压至
根目录\include\kindeditor(注:dedecms v5.7)
2、更改 根目录\include\inc\inc_fun_funAdmin.php文件,在约227行 加一段判断语句,代码如下(可自行修改),
else if($GLOBALS['cfg_html_editor']=='kindeditor')
{
$fvalue = htmlspecialchars($fvalue);
$html = "";
$html .= '<link rel="stylesheet" href="http://phply.blog.163.com/blog/../include/kindeditor/themes/default/default.css" />';
$html .= '<link rel="stylesheet" href="http://phply.blog.163.com/blog/../include/kindeditor/themes/simple/simple.css" />';
$html .= '<script charset="utf-8" src="http://phply.blog.163.com/blog/../include/kindeditor/kindeditor-min.js"></script>';
$html .= '<script charset="utf-8" src="http://phply.blog.163.com/blog/../include/kindeditor/lang/zh_CN.js"></script>';
$html .= "
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name=\"{$fname}\"]', {
width:'100%',
height:'{$nheight}px',
allowImageUpload:true,
allowFileManager:true,
afterBlur:function(){this.sync();}
});
});
</script>";
$html .= "<textarea id='{$fname}' name='{$fname}' style='height:{$nheight}px;visibility:hidden;display:none;'>{$fvalue}</textarea>";
echo $html;
if($gtype=="print")
{
echo $code;
}
else
{
return $code;
}
}
3、更改 根目录\include\kindeditor\php\upload_json.php文件,无非是上传文件的保存目录及保存URL,我更改的如下:
//文件保存目录路径
$save_path = $php_path . '../../../uploads/';
//文件保存目录URL
$save_url = '/uploads/';
更改 根目录\include\kindeditor\php\file_manager_json.php文件:
//文件保存目录路径
$root_path = $php_path . '../../../uploads/';
//文件保存目录URL
$root_url = '/uploads/';
4、dedecms后台核心设置为kindeditor,最后测试如下(单张图片、图片批量上传都可以)。
根目录\include\kindeditor(注:dedecms v5.7)
2、更改 根目录\include\inc\inc_fun_funAdmin.php文件,在约227行 加一段判断语句,代码如下(可自行修改),
else if($GLOBALS['cfg_html_editor']=='kindeditor')
{
$fvalue = htmlspecialchars($fvalue);
$html = "";
$html .= '<link rel="stylesheet" href="http://phply.blog.163.com/blog/../include/kindeditor/themes/default/default.css" />';
$html .= '<link rel="stylesheet" href="http://phply.blog.163.com/blog/../include/kindeditor/themes/simple/simple.css" />';
$html .= '<script charset="utf-8" src="http://phply.blog.163.com/blog/../include/kindeditor/kindeditor-min.js"></script>';
$html .= '<script charset="utf-8" src="http://phply.blog.163.com/blog/../include/kindeditor/lang/zh_CN.js"></script>';
$html .= "
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name=\"{$fname}\"]', {
width:'100%',
height:'{$nheight}px',
allowImageUpload:true,
allowFileManager:true,
afterBlur:function(){this.sync();}
});
});
</script>";
$html .= "<textarea id='{$fname}' name='{$fname}' style='height:{$nheight}px;visibility:hidden;display:none;'>{$fvalue}</textarea>";
echo $html;
if($gtype=="print")
{
echo $code;
}
else
{
return $code;
}
}
3、更改 根目录\include\kindeditor\php\upload_json.php文件,无非是上传文件的保存目录及保存URL,我更改的如下:
//文件保存目录路径
$save_path = $php_path . '../../../uploads/';
//文件保存目录URL
$save_url = '/uploads/';
更改 根目录\include\kindeditor\php\file_manager_json.php文件:
//文件保存目录路径
$root_path = $php_path . '../../../uploads/';
//文件保存目录URL
$root_url = '/uploads/';
4、dedecms后台核心设置为kindeditor,最后测试如下(单张图片、图片批量上传都可以)。
相关文章推荐
- 织梦DedeCMS安装UEditor编辑器方法
- dedecms5.7安装百度(ueditor)编辑器的方法
- dedecms5.7安装百度(ueditor)编辑器的方法
- dedecms5.7安装百度(ueditor)编辑器的方法
- DEDECMS中添加kindeditor编辑器【只读模式】【空白导航】
- DEDECMS安装之后需要做的事情!DEDECMS去除所有自带后门和 漏洞的方法
- 使用dedecms构建响应式站点(一)——安装
- KindEditor编辑器无法获得提交的数据
- KindEditor编辑器初始化参数
- dedecms中的ckeditor编辑器换成百度ueditor编辑器
- XAMPP 环境中安装织梦(DEDECMS)
- win7下没有可用于 ".xaml"的编辑器 确保已安装文件类型(.xaml)的应用程序
- KindEditor编辑器中的class自动过滤了
- linux 下安装 vim 编辑器
- centos6下安装dedecms
- kindeditor在线HTML编辑器
- 关于那些第三方在线编辑器ckeditor、KindEditor等在火狐或谷歌下无法进入输入框的一个问题
- Ubuntu 32/64位安装音乐标签编辑器Kid3的方法
- dedecms升级到V5.7后台按钮,编辑器无法显示
- KindEditor编辑器常用操作