对于站长来说,网站编辑器很重要。
下面,介绍DeDeBIZ安装百度UEditor编辑器使用教程与使用方法。
百度编辑器精简版下载
下载完成后,解压到网站根目录。
安装教程
打开 /system/inc/inc_fun_funAdmin.php 搜索
function SpGetEditor(
然后把这整个函数都改了
function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype = "print", $isfullpage = "false", $bbcode = false) { 中间代码省略...... }
把它改为
function SpGetEditor($fname,$fvalue,$nheight="350",$etype="Basic",$gtype="print",$isfullpage="false",$bbcode=false) { global $cfg_ckeditor_initialized; if(!isset($GLOBALS['cfg_html_editor'])) { $GLOBALS['cfg_html_editor']='ueditor'; } if($gtype=="") { $gtype = "print"; } if($GLOBALS['cfg_html_editor']=='ueditor' || $GLOBALS['cfg_html_editor']=='ckeditor') { $fvalue = $fvalue=='' ? '' : $fvalue; $code = '<script type="text/javascript" charset="utf-8" src="/ueditor/jquery.min.js"></script>'; $code .= '<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>'; $code .= '<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"></script>'; $code .= '<script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>'; $code .= '<link rel="stylesheet" type="text/css" href="/ueditor/themes/default/css/ueditor.css"/>'; $code .= '<script type="text/plain" name="'.$fname.'" id="'.$fname.'">'.$fvalue.'</script>'; if($bbcode) { $code .= '<script type="text/javascript">jQuery.noConflict();jQuery(function(){var ue = UE.getEditor("'.$fname.'",{toolbars:[["Source","|", "bold", "italic", "underline","|","fontsize","forecolor","emotion","Undo", "Redo"]],initialFrameHeight:100});});</script>'; } else { $code .= '<script type="text/javascript">jQuery.noConflict();jQuery(function(){var ue = UE.getEditor("'.$fname.'",{initialFrameHeight:450});});</script>'; } if($gtype=="print") { echo $code; } else { return $code; } } else { /* // ------------------------------------------------------------------------ // 设置添加多个编辑器 */ } }
一个百度编辑器就够了。修改附件目录就往下看。
那个 /static/ckeditor 原编辑器目录,不用的话可删。
修改附件目录
文件图片、附件保存目录修改,新网站的话不需要,旧网站的话就需要改和原站一样。
打开 /ueditor/php/config.json 文件,这个就是附件保存目录了。
如有问题,可参考《织梦编辑器换为百度编辑器的教程》DeDeCMS的教程,如果不会解决的可在下方留言。





登录后方可回帖