搜索“百度ueditor”去官方下載編輯器源碼
在include目錄下新建一個“ueditor”文件夾,講剛才下載的文件解壓后上傳至此目錄。
找到include/inc/下的inc_func_funcAdmin.php文件,在判斷編輯器部分,如下
if($GLOBALS['cfg_html_editor']=='fck')
在它后面大概367行添加如下判斷
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; } }進(jìn)入后臺,在>系統(tǒng)>系統(tǒng)基本參數(shù)>核心設(shè)置>將“Html編輯器”改為“ueditor”,然后保存即可。
新聞熱點(diǎn)
疑難解答
圖片精選