Skip to content

Commit

Permalink
hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
zurfyx committed Jun 18, 2024
1 parent c468a75 commit cad982c
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 cad982c

Please sign in to comment.