婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > 將織夢dedecms后臺編輯器更改為Ueditor

將織夢dedecms后臺編輯器更改為Ueditor

POST TIME:2020-04-10 20:50

網站教程很多了,關于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';
$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=&;".$GLOBALS["cfg_cmspath"]."/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;
}
}

4 .進入后臺系統設置--核心設置修改編輯器為ueditor

至此,后臺的編輯器已經可以使用了,但最主要的還是前臺看到。下面的步驟就很重要了(慚愧的說本人卡在這很久)

5.在你的文章頁模板的底部....中加入如下代碼!

12345 <script type="text/javascript">
SyntaxHighlighter.highlight();
var editor_a = new baidu.editor.ui.Editor();
editor_a.render( 'myEditor' );
</script>

并在內容頁的模板head中加入如下代碼

12 <script type="text/javascript" src="/include/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<link type="text/css" rel="stylesheet" href="/include/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css" />

*注意路徑,更改為你ueditor的目錄下對應的文件目錄

6.最后更新緩存,生成文檔!



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 雷波县| 开江县| 从江县| 唐河县| 珠海市| 正安县| 平遥县| 疏附县| 通化县| 榆社县| 苏州市| 凤城市| 吉隆县| 花莲县| 大化| 玛曲县| 连南| 独山县| 灵丘县| 汝南县| 土默特左旗| 托克逊县| 鄂温| 金湖县| 大邑县| 柳河县| 绍兴县| 花垣县| 库车县| 乌苏市| 称多县| 沙坪坝区| 河东区| 天水市| 盐亭县| 罗山县| 漳平市| 航空| 和田县| 长治市| 阿拉尔市|