future #10

Merged
袁涛 merged 37 commits from future into main 2025-10-17 14:46:33 +08:00
18 changed files with 1918 additions and 1308 deletions
Showing only changes of commit c47835e2ee - Show all commits

View File

@@ -214,6 +214,10 @@ const handleSave = async () => {
const isContentEmpty = content => {
if (!content) return true
// 检查是否包含图片元素
const hasImages = /<img[^>]*>|<div[^>]*class="[^"]*editor-image[^"]*"[^>]*>/.test(content)
if (hasImages) return false
// 移除HTML标签和空白字符后检查是否为空
const plainText = content.replace(/<[^>]*>/g, '').trim()
if (plainText === '') return true