提取密码: 3r8m
织梦后台整合百度编辑器UEditor1.4.3的方法,首先,去百度ueditor编辑器的官网下载对应的版本,下载下来,然后修改名称为“ueditor”,并进行打包上传到include目录下。
整合方法如下:
一、修改 inc/inc_func_funcAdmin.php 文件
打开include下的inc文件夹内的inc_func_funcAdmin.php找到184行,贴入以下代码。
else if($GLOBALS['cfg_html_editor']=='ueditor') { $fvalue = $fvalue=='' ? '<p></p>' : $fvalue; $code = '<script type="text/javascript" charset="utf-8" src="/include/ueditor/ueditor.config.js"></script> <script type="text/javascript" charset="utf-8" src="/include/ueditor/ueditor.all.js"></script> <link rel="stylesheet" type="text/css" href="/include/ueditor/themes/default/css/ueditor.css"/> <textarea name="'.$fname.'" id="'.$fname.'" style="width:100%;">'.$fvalue.'</textarea> <script type="text/javascript">var ue = new baidu.editor.ui.Editor();ue.render("'.$fname.'");</script>'; if($gtype=="print") { echo $code; } else { return $code; } }
二、修改配置
进入网站后台-->系统-->系统基本参数-->核心设置-->将 Html编辑器的值改为 ueditor ,然后保存。 到了这一步,那么恭喜你,文本编辑器已经替换成功!
温馨提示:如果不想自行修改的,在本文下载文件替换即可,在替换之前,最好备份下所要修改的文件inc/inc_func_funcAdmin.php,本文提供的下载插件为UTF8编码,如果使用GBK编码的小伙伴,请自行转码。
收藏