|
@@ -68,7 +68,9 @@ function ZRichTexts(
|
|
|
|
|
|
const txtRes = txt.replaceAll(' ', '').replaceAll('</p><p>', '')
|
|
|
|
|
|
- if (txtRes.split('></p>').length - 1 === 1 || txtRes === '') flag = true
|
|
|
+ if (txtRes === '') flag = true
|
|
|
+
|
|
|
+ if (txtRes.split('></p>').length - 1 === 1 && !txtRes.includes('class="media-')) flag = true
|
|
|
} else {
|
|
|
// 按章节发布 检查 所有的 标题 和富文本
|
|
|
sectionArr.forEach((v, i) => {
|
|
@@ -76,7 +78,9 @@ function ZRichTexts(
|
|
|
const txt: string = v.txt.toHTML()
|
|
|
|
|
|
const txtRes = txt.replaceAll(' ', '').replaceAll('</p><p>', '')
|
|
|
- if (txtRes.split('></p>').length - 1 === 1 || txtRes === '') flag = true
|
|
|
+ if (txtRes === '') flag = true
|
|
|
+
|
|
|
+ if (txtRes.split('></p>').length - 1 === 1 && !txtRes.includes('class="media-')) flag = true
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -252,8 +256,12 @@ function ZRichTexts(
|
|
|
let flag = false
|
|
|
if (!name && isSection) flag = true
|
|
|
const txtRes: string = txt.toHTML()
|
|
|
- if (txtRes.replaceAll('<p>', '').replaceAll('</p>', '').replaceAll(' ', '') === '')
|
|
|
- flag = true
|
|
|
+ const txtRes2 = txtRes.replaceAll(' ', '').replaceAll('</p><p>', '')
|
|
|
+
|
|
|
+ if (txtRes2 === '') flag = true
|
|
|
+
|
|
|
+ if (txtRes2.split('></p>').length - 1 === 1 && !txtRes2.includes('class="media-')) flag = true
|
|
|
+
|
|
|
return flag
|
|
|
},
|
|
|
[isSection]
|