You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/README.md
+23Lines changed: 23 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,29 @@ export default function App() {
165
165
}
166
166
```
167
167
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
+
importReactfrom"react";
174
+
importMDEditorfrom'@uiw/react-md-editor';
175
+
176
+
exportdefaultfunctionApp() {
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
+
168
191
### Custom Toolbars
169
192
170
193
[](https://codesandbox.io/embed/react-md-editor-custom-toolbars-m2n10?fontsize=14&hidenavigation=1&theme=dark)
0 commit comments