百度編輯器整合到織夢裏

廢話很少說:javascript

  一、到ueditor.baidu.com,下載你所須要的版本。php

  二、進織夢後臺修改系統->系統基本參數->核心設置 裏面修改《Html編輯器(ckeditor,須要fck的用戶能夠去官網下載)》爲  ueditor。html

  三、將ueditor複製到織夢的目錄include下。java

  四、打開織夢include->inc 裏面的inc_fun_funAdmin.php文件,修改226-227直接加入代碼
      else if($GLOBALS['cfg_html_editor']=='ueditor'){
        $fvalue = $fvalue=="" ? "<p>請在這裏添加內容</p>" : $fvalue;
        $code ="";
            $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.js"></script>';
      
            $code .='<textarea name="'.$fname.'" id="'.$fname.'" style="width:100%;">'.$fvalue.'</textarea>';
            $code .='<script type="text/javascript">var ue = new baidu.editor.ui.Editor();ue.render("'.$fname.'");</script>';
       
        if($gtype=="print")
        {     
                    echo $code;
            }
            else
            {
                        return $code;           
            }
   
       
    }
編輯器

  五、OK了。ui

相關文章
相關標籤/搜索