Skip to content

Commit

Permalink
docs: update placeholder prop to ContentEditable impl
Browse files Browse the repository at this point in the history
  • Loading branch information
RobHannay committed Feb 17, 2025
1 parent 43ceb5f commit a5d2afc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ function Editor() {
<PlainTextPlugin
contentEditable={
<ContentEditable
placeholder={<div>Enter some text...</div>}
aria-placeholder={'Enter some text...'}
placeholder={<div>Enter some text...</div>}
/>
}
ErrorBoundary={LexicalErrorBoundary}
Expand Down
8 changes: 6 additions & 2 deletions packages/lexical-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ function Editor() {
return (
<LexicalComposer initialConfig={initialConfig}>
<PlainTextPlugin
contentEditable={<ContentEditable />}
placeholder={<div>Enter some text...</div>}
contentEditable={
<ContentEditable
aria-placeholder={'Enter some text...'}
placeholder={<div>Enter some text...</div>}
/>
}
/>
<OnChangePlugin onChange={onChange} />
<HistoryPlugin />
Expand Down
2 changes: 1 addition & 1 deletion packages/lexical-website/docs/getting-started/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ function Editor() {
<RichTextPlugin
contentEditable={
<ContentEditable
placeholder={<div>Enter some text...</div>}
aria-placeholder={'Enter some text...'}
placeholder={<div>Enter some text...</div>}
/>
}
ErrorBoundary={LexicalErrorBoundary}
Expand Down
8 changes: 6 additions & 2 deletions packages/lexical-website/docs/getting-started/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ export default function Editor() {
return (
<LexicalComposer initialConfig={initialConfig}>
<PlainTextPlugin
contentEditable={<ContentEditable />}
placeholder={<div className="editor-placeholder">Enter some text...</div>}
contentEditable={
<ContentEditable
aria-placeholder={'Enter some text...'}
placeholder={<div className="editor-placeholder">Enter some text...</div>}
/>
}
ErrorBoundary={LexicalErrorBoundary}
/>
</LexicalComposer>
Expand Down
16 changes: 12 additions & 4 deletions packages/lexical-website/docs/react/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ React wrapper for `@lexical/plain-text` that adds major features for plain text

```jsx
<PlainTextPlugin
contentEditable={<ContentEditable />}
placeholder={<div>Enter some text...</div>}
contentEditable={
<ContentEditable
aria-placeholder={'Enter some text...'}
placeholder={<div>Enter some text...</div>}
/>
}
ErrorBoundary={LexicalErrorBoundary}
/>
```
Expand All @@ -57,8 +61,12 @@ React wrapper for `@lexical/rich-text` that adds major features for rich text ed

```jsx
<RichTextPlugin
contentEditable={<ContentEditable />}
placeholder={<div>Enter some text...</div>}
contentEditable={
<ContentEditable
aria-placeholder={'Enter some text...'}
placeholder={<div>Enter some text...</div>}
/>
}
ErrorBoundary={LexicalErrorBoundary}
/>
```
Expand Down

0 comments on commit a5d2afc

Please sign in to comment.