织梦编辑器实在是不敢恭维,而且时而会出一些莫名其妙的问题。下面说一下怎么修改织梦默认的编辑器。
1、找到替换织梦编辑器的其他编辑器文件,我用得ueditor编辑器。
下载地址:https://pan.baidu.com/s/1O-sbowNQbuJhwqpgjCQmnA
提取码:wvug
然后将文件解压到include文件夹里面
2、修改/include/inc//inc_func_funcAdmin.php文件(注意备份),通过else if 找到需要修改的代码行,插入代码
1 else if($GLOBALS['cfg_html_editor']=='ueditor')
2 {
3 $fvalue = $fvalue=='' ? '<p></p>' : $fvalue;
4 $code = '<script type="text/javascript" charset="utf-8" src="/include/ueditor/ueditor.config.js"></script><script type="text/javascript" charset="utf-8"
5 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.'"
6 style="width:100%;">'.$fvalue.'</textarea><script type="text/javascript">var ue = new baidu.editor.ui.Editor();ue.render("'.$fname.'");</script>';
7 if($gtype=="print")
8 {
9 echo $code;
10 }
11 else
12 {
13 return $code;
14 }
15 }
如下图

然后将修改好的文件,覆盖到原文件里面。
3、在织梦后台设置,路径为系统-核心设置-Html编辑器(ckeditor,需要fck的用户可以去官网下载),如下图,修改为ueditor,然后点击确定即可。

4、刷新后台,即可获得。

