Skip to content

Commit cb94fae

Browse files
committed
Adding method documentation to Readme
Including clarification of how to access the CodeMirror instance after `componentDidMount` has fired, ref JedWatson#27
1 parent 9756032 commit cb94fae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ var App = React.createClass({
5656
React.render(<App />, document.getElementById('app'));
5757
```
5858

59+
### Methods
60+
61+
*`focus` focuses the CodeMirror instance
62+
*`getCodeMirror` returns the CodeMirror instance, available .
63+
64+
You can interact with the CodeMirror instance using a `ref` and the `getCodeMirror()` method after the `componentDidMount` lifecycle event has fired (including inside the `componentDidMount` event in a parent Component).
65+
5966
### Properties
6067

6168
*`autoSave``Boolean` automatically persist changes to underlying textarea (default false)

0 commit comments

Comments
(0)