Skip to content

Commit 296a20d

Browse files
committed
Update document.
1 parent ed230d5 commit 296a20d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const Dome = () => (
4949
);
5050
```
5151

52-
uncontrolled usage
52+
controlled usage
5353

5454
```jsx
5555
import MarkdownEditor from '@uiwjs/react-markdown-editor';
@@ -66,7 +66,7 @@ class App extends React.Component {
6666
this.updateMarkdown = this.updateMarkdown.bind(this);
6767
}
6868

69-
updateMarkdown(value) {
69+
updateMarkdown(editor, data, value) {
7070
this.setState({ markdown: value });
7171
}
7272

@@ -89,7 +89,7 @@ ReactDOM.render(
8989
## Props
9090

9191
- value (*string*) - the raw markdown that will be converted to html (**required**)
92-
- onChange (*function*) - called when a change is made (**required**)
92+
- onChange (*function(editor: IInstance, data: CodeMirror.EditorChange, value: string)*) - called when a change is made (**required**)
9393

9494

9595
### Development

0 commit comments

Comments
 (0)