youssefreda9 commited on
Commit
b4b4d70
·
1 Parent(s): 80d7d85

fix: placeholder no longer shows over quran-applied text

Browse files
Files changed (1) hide show
  1. src/js/editor.js +2 -2
src/js/editor.js CHANGED
@@ -210,8 +210,8 @@ function updatePlaceholder() {
210
  const editor = getEditorElement();
211
  if (!editor) return;
212
 
213
- const text = getEditorText();
214
- if (!text || text.trim().length === 0) {
215
  editor.setAttribute('data-empty', 'true');
216
  } else {
217
  editor.removeAttribute('data-empty');
 
210
  const editor = getEditorElement();
211
  if (!editor) return;
212
 
213
+ const text = (editor.textContent || '').trim();
214
+ if (!text || text.length === 0) {
215
  editor.setAttribute('data-empty', 'true');
216
  } else {
217
  editor.removeAttribute('data-empty');