織夢安裝百度編輯器UEditor

1.下載地址:https://ueditor.baidu.com/website/download.html

2.解壓到include裏更換名字ueditor

找到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;

}

}

找到後臺系統----核心設置

找到data裏的config.cache.inc.php,改成:

$cfg_html_editor = 'ueditor';

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章