Skip to content

Commit

Permalink
hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
zurfyx committed May 25, 2024
1 parent f5bd273 commit d936b56
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/lexical-react/src/LexicalContentEditable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ function Placeholder({
return null;
}

let placeholder = null;
if (typeof content === 'function') {
return content(editable);
} else {
return content;
placeholder = content(editable);
} else if (content !== null) {
placeholder = content;
}

if (placeholder === null) {
return null;
}
return <div aria-hidden={true}>{placeholder}</div>;
}

0 comments on commit d936b56

Please sign in to comment.