|
@@ -721,7 +721,7 @@ async function handlePreviewReport() {
|
|
|
function autoSaveReportContent(type="auto") {
|
|
|
if(!route.query.id) return
|
|
|
|
|
|
- const html=document.getElementById('report-html-content').outerHTML.replace(/contenteditable="true"/g,'contenteditable="false"');
|
|
|
+ const html= handleContentFormat()
|
|
|
return new Promise(async (resolve,reject)=>{
|
|
|
|
|
|
let imgParams = {
|
|
@@ -746,6 +746,13 @@ function autoSaveReportContent(type="auto") {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+//处理内容格式
|
|
|
+function handleContentFormat() {
|
|
|
+ let htmlStr = document.getElementById('report-html-content').outerHTML.replace(/contenteditable="true"/g,'contenteditable="false"').replace(/comp-insert-add"/g,'comp-insert-add" style="display:none"');
|
|
|
+
|
|
|
+ contentChange.value = true;
|
|
|
+ return htmlStr
|
|
|
+}
|
|
|
|
|
|
//发布,定时发布,提交
|
|
|
async function handlePublishReport(tp) {
|
|
@@ -785,7 +792,7 @@ async function handlePreviewChapter() {
|
|
|
// 自动保存章节报告
|
|
|
async function autoSaveReportChapter(type="auto"){
|
|
|
if(!route.query.chapterId) return
|
|
|
- const html=document.getElementById('report-html-content').outerHTML.replace(/contenteditable="true"/g,'contenteditable="false"');
|
|
|
+ const html = handleContentFormat();
|
|
|
|
|
|
return new Promise(async (resolve,reject)=>{
|
|
|
const res=await apiReport.chapterDetailSave({
|