网上试了好多代码,终于找到这一段成功了,留存一下:
代码如下 | 复制代码 |
else if($GLOBALS[‘cfg_html_editor’]==’ueditor’) { $fvalue = $fvalue==” ? ‘<p></p>’ : $fvalue; $code = ‘<script type=”text/javascript” charset=”utf-8″ src=”‘.$GLOBALS[‘cfg_cmspath’].’/include/ueditor/ueditor.config.js”></script>'; $code .= ‘<script type=”text/javascript” charset=”utf-8″ src=”‘.$GLOBALS[‘cfg_cmspath’].’/include/ueditor/ueditor.all.min.js”></script>'; $code .= ‘<link rel=”stylesheet” type=”text/css” href=”‘.$GLOBALS[‘cfg_cmspath’].’/include/ueditor/themes/default/css/ueditor.css”/>'; //$code .= ‘<textarea name=”‘.$fname.'” id=”‘.$fname.'” style=”width:100%;”>’.$fvalue.'</textarea>'; $code .= ‘<script type=”text/plain” name=”‘.$fname.'” id=”‘.$fname.'”>’.$fvalue.'</script>'; if($bbcode) { $code .= ‘<script type=”text/javascript”>UE.getEditor(“‘.$fname.'”,{toolbars:[[“Source”,”|”, “bold”, “italic”, “underline”,”|”,”fontsize”,”forecolor”,”emotion”,”Undo”, “Redo”]],initialFrameHeight:100});</script>'; } else { $code .= ‘<script type=”text/javascript”>UE.getEditor(“‘.$fname.'”,{initialFrameHeight:450});</script>'; } if($gtype==”print”) |
替换步骤也简单记录一下:
1、下载ueditor并改好名字放在dedecms的“include”目录;
2、修改include目录中“inc”目录里的“inc_fun_funAdmin.php”文件,找到“获取编辑器”段的函数“SpGetEditor”代码,在其“else”前添加如上代码;
3、进入dedecms后台→系统→系统基本参数→核心设置,修改html编辑器的名字为ueditor。
时间: 2024-10-31 05:25:37