Skip to content

Commit bc85ed2

Browse files
committed
doc: Update document. #626
1 parent 55a55a1 commit bc85ed2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

core/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,29 @@ export default function App() {
165165
}
166166
```
167167

168+
### Placeholder & maxLength
169+
170+
"Below is an example that sets the `placeholder` for the editor and defines the maximum input character length as `10` characters."
171+
172+
```jsx mdx:preview
173+
import React from "react";
174+
import MDEditor from '@uiw/react-md-editor';
175+
176+
export default function App() {
177+
const [value, setValue] = React.useState("");
178+
return (
179+
<MDEditor
180+
value={value}
181+
onChange={setValue}
182+
textareaProps={{
183+
placeholder: 'Please enter Markdown text',
184+
maxLength: 10
185+
}}
186+
/>
187+
);
188+
}
189+
```
190+
168191
### Custom Toolbars
169192

170193
[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?logo=codesandbox)](https://codesandbox.io/embed/react-md-editor-custom-toolbars-m2n10?fontsize=14&hidenavigation=1&theme=dark)

0 commit comments

Comments
 (0)