Skip to content

Commit

Permalink
docs: update React Getting Started to recommend ContentEditable `pl…
Browse files Browse the repository at this point in the history
…aceholder` prop
  • Loading branch information
RobHannay committed Feb 17, 2025
1 parent 9deab94 commit 43ceb5f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ function Editor() {
return (
<LexicalComposer initialConfig={initialConfig}>
<PlainTextPlugin
contentEditable={<ContentEditable />}
placeholder={<div>Enter some text...</div>}
contentEditable={
<ContentEditable
placeholder={<div>Enter some text...</div>}
aria-placeholder={'Enter some text...'}
/>
}
ErrorBoundary={LexicalErrorBoundary}
/>
<OnChangePlugin onChange={onChange} />
Expand Down
16 changes: 12 additions & 4 deletions packages/lexical-website/docs/getting-started/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ function Editor() {
return (
<LexicalComposer initialConfig={initialConfig}>
<RichTextPlugin
contentEditable={<ContentEditable />}
placeholder={<div>Enter some text...</div>}
contentEditable={
<ContentEditable
placeholder={<div>Enter some text...</div>}
aria-placeholder={'Enter some text...'}
/>
}
ErrorBoundary={LexicalErrorBoundary}
/>
<HistoryPlugin />
Expand Down Expand Up @@ -135,8 +139,12 @@ function Editor() {
return (
<LexicalComposer initialConfig={initialConfig}>
<RichTextPlugin
contentEditable={<ContentEditable />}
placeholder={<div>Enter some text...</div>}
contentEditable={
<ContentEditable
aria-placeholder={'Enter some text...'}
placeholder={<div>Enter some text...</div>}
/>
}
ErrorBoundary={LexicalErrorBoundary}
/>
<HistoryPlugin />
Expand Down

0 comments on commit 43ceb5f

Please sign in to comment.