Skip to content

Commit

Permalink
doc: Update document. #626
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 28, 2024
1 parent 55a55a1 commit bc85ed2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,29 @@ export default function App() {
}
```

### Placeholder & maxLength

"Below is an example that sets the `placeholder` for the editor and defines the maximum input character length as `10` characters."

```jsx mdx:preview
import React from "react";
import MDEditor from '@uiw/react-md-editor';

export default function App() {
const [value, setValue] = React.useState("");
return (
<MDEditor
value={value}
onChange={setValue}
textareaProps={{
placeholder: 'Please enter Markdown text',
maxLength: 10
}}
/>
);
}
```

### Custom Toolbars

[![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)
Expand Down

0 comments on commit bc85ed2

Please sign in to comment.