如何更换dede默认编辑器更改为Ueditor

 工具/原料

  • 织梦系统

 方法/步骤


  1. 将ueditor 减压拷贝到include下改名为ueditor;

  2. 进行系统后台:系统设置-核心设置-html编辑器名字改为:uedtor,更新缓存;

  3. 找到include/inc/inc_fun_functionAdmin.php里面的else{ return $code;}} 后面添加:

     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")

            {

                echo $code;

            }

            else

            {

                return $code;

            }

        }//bd end

  4. 4

    即可; 插入图片排序问题需要修改如下地方: 将原来的_this.imageList.push(json);修改为_this.imageList[$file.index()] = json; 修改的文件为ueditor目录下的dialogs/image/image.js PHP文件上文件路径更改修改php/config.json即可

  5. ueditor1_4_3_3-utf8-php.zip