diff --git a/view/admin/post/edit_content.html b/view/admin/post/edit_content.html
index b19f71c..ce3402f 100644
--- a/view/admin/post/edit_content.html
+++ b/view/admin/post/edit_content.html
@@ -94,6 +94,9 @@
+
+ 内容变动自动提交
+
{:urlencode($post->content_html)}
@@ -118,23 +121,25 @@
if (contentSaveLock) {
setTimeout(() => {
autoSaveContent();
- }, 5000);
+ }, 2600);
} else {
contentSaveLock = true;
$.post('{:url("update")}', {
content_html: editor.getHtml(),
id: '{$post->id}'
}, function (result) {
-
+ $('#content-state').text('自动提交成功')
setTimeout(() => {
autoSaveContent();
- }, 5000);
+ }, 2600);
})
}
}
+ autoSaveContent();
+
const E = window.wangEditor;
const editorConfig = { MENU_CONF: {} }
@@ -146,6 +151,8 @@
editorConfig.onChange = (editor) => {
console.log('content', editor)
contentSaveLock = false;
+
+ $('#content-state').text('等待自动提交')
}
// 先创建 editor
@@ -167,7 +174,7 @@
})
setTimeout(() => {
- $('#content').height(window.innerHeight - $('#editor-toolbar').outerHeight() - 30 - 45 - 7)
+ $('#content').height(window.innerHeight - $('#editor-toolbar').outerHeight() - 30 - 45 - 7 - 31)
}, 300);