diff --git a/src/lib/components/Course/components/Lesson/Materials/index.svelte b/src/lib/components/Course/components/Lesson/Materials/index.svelte index 2b101cd2..5debefa6 100644 --- a/src/lib/components/Course/components/Lesson/Materials/index.svelte +++ b/src/lib/components/Course/components/Lesson/Materials/index.svelte @@ -65,10 +65,13 @@ function isNoteEmpty(note) { if (!note || typeof note !== 'string') return true; - if (!note.trim()) return true; - if (note.trim() === '


') return true; - return false; + const dummyDiv = document.createElement('div'); + dummyDiv.innerHTML = note; + + const rawText = dummyDiv.textContent?.trim(); + + return rawText === ''; } function handleSave(prevMode: string) {