相關(guān)關(guān)鍵詞
關(guān)于我們
最新文章
- PHP中opcode緩存簡(jiǎn)單用法分析
- thinkPHP控制器變量在模板中的顯示方法示例
- PHP move_uploaded_file() 函數(shù)(將上傳的文件移動(dòng)到新位置)
- dirname(__FILE__)的含義和應(yīng)用說明
- thinkPHP5框架實(shí)現(xiàn)分頁(yè)查詢功能的方法示例
- PHP中單雙號(hào)與變量
- PHP獲得當(dāng)日零點(diǎn)時(shí)間戳的方法分析
- Laravel ORM對(duì)Model::find方法進(jìn)行緩存示例詳解
- PHP讀寫文件高并發(fā)處理操作實(shí)例詳解
- 【CLI】利用Curl下載文件實(shí)時(shí)進(jìn)度條顯示的實(shí)現(xiàn)
織夢(mèng)更換Ueditor編輯器后欄目?jī)?nèi)容提交更新失敗
今天在使用網(wǎng)友的相關(guān)經(jīng)驗(yàn)《百度編輯器(Ueditor)整合到dedecms》,給織夢(mèng)dedecms系統(tǒng)更換編輯器后,文章編輯器使用正常,在編輯欄目?jī)?nèi)容的時(shí)候,出現(xiàn)提交后不更新內(nèi)容的情況,上網(wǎng)查相關(guān)文章,得出解決辦法如下;
一、在欄目?jī)?nèi)容編輯里替換回默認(rèn)的ckeditor編輯器;
文件位置:/dede/templates/catalog_edit.htm、/dede/templates/catalog_add.htm
查找:
GetEditor(
"content"
,
""
,
"450"
,
"Default"
,
"print"
,
"false"
);
在此上面插入紅色的代碼部分;
<?php
$GLOBALS['cfg_html_editor']='ckeditor';
GetEditor("content","","450","Default","print","false");
?>
二、完全使用Ueditor編輯器,不替換回原來(lái)的默認(rèn)編輯器
文件位置/dede/templates
文件templets_one_edit.htm、templets_one_add.htm、catalog_edit.htm、catalog_add.htm
查找
function
checkSubmit()
{
if
(document.form1.typename.value==
""
){
alert(
"欄目名稱不能為空!"
);
document.form1.typename.focus();
return
false;
}
return
true;
}
在函數(shù)最后的 return true();前加一行:
document.form1.content.value = document.getElementById(
"baidu_editor_0"
).contentWindow.document.body.innerHTML;