將織夢dedecms后臺編輯器更改為Ueditor,dedecms
導讀:dedecmsdedecms網站教程很多了,關于ueditor我也不做過多介紹了,官網上都有。這里著重說說個人使用時遇到的問題 分享給大家 1.去Ueditor官網下載最新的php版本 hdede織夢模板織夢網站模板。
網站教程很多了,關于ueditor我也不做過多介紹了,官網上都有。這里著重說說個人使用時遇到的問題 分享給大家
1.去Ueditor官網下載最新的php版本 http://ueditor.baidu.com解壓后,將文件夾的名字改為ueditor,上傳至網站根目錄的include中。
2.修改include中inc文件夾中的inc_fun_funAdmin.php文件(注意備份之前的文件)找到以下代碼(最新的大約在212行左右)
$GLOBALS['tools'] = empty($toolbar[$etype])? $GLOBALS['tools'] : $toolbar[$etype] ; $config['toolbar'] = $GLOBALS['tools']; $config['height'] = $nheight; $config['skin'] = 'kama夢織模板39;; $CKEditor->returnOutput = TRUE; $code = $CKEditor->editor($fname, $fvalue, $config, $events); if($gtype=="print") { echo $code; } else { return $code; } } **** else {
3.在****位置加入如下代碼 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> <script type=\"text/javascript\" charset=\"utf-8\" src=\"".$GLOBALS["cfg_cmspath"]."/include/ueditor/ueditor.all.js\"></script> <link rel=\"stylesheet\" type=\"text/css\" href=\"".$GL免費織夢模板OBALS["cfg_cmspath"]."/include/ueditor/themes/default/css/ueditor.css\"/> <textarea name=\&qudede網站模板ot;".$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; } }
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-20 ,文章將織夢dedecms后臺編輯器更改為Ueditor,dedecms主要講述編輯器,后臺,織夢網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_31232.html
