相關(guān)關(guān)鍵詞
關(guān)于我們
最新文章
織夢更換Ueditor編輯器后欄目內(nèi)容提交更新失敗
今天在使用網(wǎng)友的相關(guān)經(jīng)驗《百度編輯器(Ueditor)整合到dedecms》,給織夢dedecms系統(tǒng)更換編輯器后,文章編輯器使用正常,在編輯欄目內(nèi)容的時候,出現(xiàn)提交后不更新內(nèi)容的情況,上網(wǎng)查相關(guān)文章,得出解決辦法如下;
一、在欄目內(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編輯器,不替換回原來的默認(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;