diff --git a/src/pages/NoteEditorPage.vue b/src/pages/NoteEditorPage.vue index 969cfc7..263c94a 100644 --- a/src/pages/NoteEditorPage.vue +++ b/src/pages/NoteEditorPage.vue @@ -214,6 +214,10 @@ const handleSave = async () => { const isContentEmpty = content => { if (!content) return true + // 检查是否包含图片元素 + const hasImages = /]*>|]*class="[^"]*editor-image[^"]*"[^>]*>/.test(content) + if (hasImages) return false + // 移除HTML标签和空白字符后检查是否为空 const plainText = content.replace(/<[^>]*>/g, '').trim() if (plainText === '') return true