织梦 整合UEditor编辑器栏目内容、单页无法保存

第一步:找到 include\inc\inc_fun_funAdmin.php 在227行添加如下的代码:

 

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;
        }
    }

第二步:在 dede\templets\ 下分别找到 templets_one_edit.htm、templets_one_add.htm、catalog_edit.htm、catalog_add.htm,添加代码如下:



 

$GLOBALS['cfg_html_editor']='ckeditor';

效果图:

 

猜你喜欢

转载自onestopweb.iteye.com/blog/2311525