标签:dmi www function 地图 上传 color tde nal icon
本站所有附件均为UTF-8版本,GBK版本的童学请自行转码。

目前最新版本是 KindEditor 4.1.10,下载解压,只要下面几个文件就行了,在你的dedecms程序include文件夹下,建个kindeditor文件夹,然后把解压出来的这几个文件放进去,最终结果是:

百度盘 密码: v9a5

找到
else if($GLOBALS[‘cfg_html_editor‘]==‘ckeditor‘)
{
中间代码省略...
}
在它们的下面加入
else if($GLOBALS[‘cfg_html_editor‘]==‘kindeditor‘)
{
$fvalue =htmlspecialchars($fvalue);
$uploadJson = $GLOBALS[‘cfg_cmspath‘]."/include/dialog/kindeditor_post.php";
$fileManagerJson = $GLOBALS[‘cfg_cmspath‘]."/include/dialog/kindeditor_manager.php";
$allowFileManager = ‘true‘;
$extendconfig = ‘‘;
if($etype == ‘Member‘ || $etype == ‘MemberLit‘ || $etype == ‘Diy‘ || $etype == ‘Feedback‘)
{
$uploadJson = "";
$fileManagerJson = "";
$allowFileManager = ‘false‘;
$extendconfig = ‘allowImageUpload : false,‘;
$extendconfig .= ‘allowFlashUpload : false,‘;
$extendconfig .= ‘allowMediaUpload : false,‘;
$extendconfig .= ‘allowFileUpload : false,‘;
}
$items[‘Member‘] = "[
‘source‘, ‘|‘, ‘undo‘, ‘redo‘, ‘|‘, ‘preview‘, ‘print‘, ‘template‘, ‘cut‘, ‘copy‘, ‘paste‘,
‘plainpaste‘, ‘wordpaste‘, ‘|‘, ‘justifyleft‘, ‘justifycenter‘, ‘justifyright‘,
‘justifyfull‘, ‘insertorderedlist‘, ‘insertunorderedlist‘, ‘indent‘, ‘outdent‘, ‘subscript‘,
‘superscript‘, ‘clearhtml‘, ‘quickformat‘, ‘selectall‘, ‘|‘, ‘fullscreen‘, ‘/‘,
‘formatblock‘, ‘fontname‘, ‘fontsize‘, ‘|‘, ‘forecolor‘, ‘hilitecolor‘, ‘bold‘,
‘italic‘, ‘underline‘, ‘strikethrough‘, ‘lineheight‘, ‘removeformat‘, ‘|‘, ‘image‘,
‘flash‘, ‘media‘, ‘insertfile‘, ‘table‘, ‘hr‘, ‘emoticons‘, ‘map‘, ‘pagebreak‘,
‘link‘, ‘unlink‘, ‘|‘, ‘about‘]";
$items[‘Small‘] = $items[‘MemberLit‘] = $items[‘Diy‘] = "[
‘fontname‘, ‘fontsize‘, ‘|‘, ‘forecolor‘, ‘hilitecolor‘, ‘bold‘, ‘italic‘, ‘underline‘,
‘removeformat‘, ‘|‘, ‘justifyleft‘, ‘justifycenter‘, ‘justifyright‘, ‘insertorderedlist‘,
‘insertunorderedlist‘, ‘|‘, ‘emoticons‘, ‘image‘, ‘link‘]";
$items[‘Feedback‘]= "[
‘fontname‘, ‘fontsize‘, ‘|‘, ‘forecolor‘, ‘hilitecolor‘, ‘bold‘, ‘italic‘, ‘underline‘,
‘removeformat‘, ‘|‘, ‘justifyleft‘, ‘justifycenter‘, ‘justifyright‘, ‘insertorderedlist‘,
‘insertunorderedlist‘, ‘|‘, ‘emoticons‘]";
$itemconfig = ‘‘;
if(isset($items[$etype]))
{
$itemconfig = "items :{$items[$etype]},";
}
$session_id = session_id();
$code = <<<HTML
<link rel="stylesheet" href="{$GLOBALS[‘cfg_cmspath‘]}/include/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{$GLOBALS[‘cfg_cmspath‘]}/include/kindeditor/plugins/code/prettify.css" />
<script src="{$GLOBALS[‘cfg_cmspath‘]}/include/kindeditor/kindeditor-min.js"></script>
<script src="{$GLOBALS[‘cfg_cmspath‘]}/include/kindeditor/lang/zh_CN.js"></script>
<script src="{$GLOBALS[‘cfg_cmspath‘]}/include/kindeditor/plugins/code/prettify.js"></script>
<script type="text/javascript">
KindEditor.ready(function(K) {
var editor1 = K.create(‘textarea[name="{$fname}"]‘, {
cssPath : ‘{$GLOBALS[‘cfg_cmspath‘]}/include/kindeditor/plugins/code/prettify.css‘,
uploadJson : ‘$uploadJson‘,
fileManagerJson : ‘$fileManagerJson‘,
filterMode: false,//是否开启过滤模式
extraFileUploadParams: {
PHPSESSID : ‘{$session_id}‘
},
$extendconfig
$itemconfig
allowFileManager : {$allowFileManager},
afterBlur: function(){this.sync();}
});
prettyPrint();
});
</script>
<textarea name="{$fname}" style="height:{$nheight}px;visibility:hidden;width: 100%;">{$fvalue}</textarea>
HTML;
if($gtype=="print")
{
echo $code;
}
else
{
return $code;
}
}
ps
■修复了已知问题session
■dedediy kineditor增加QQ图标
■dedediy kineditor增加百度地图动态
标签:dmi www function 地图 上传 color tde nal icon
原文地址:http://www.cnblogs.com/dedediy/p/6568985.html