Skip to content

Commit

Permalink
doc(lifecycle hooks): Document lifecycle hooks (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbekolay authored and bantic committed Jun 29, 2018
1 parent 39c573c commit bb87a00
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,27 @@ And pass that list into the `{{mobiledoc-editor}}` component:
{{mobiledoc-editor atoms=atoms}}
```

### Editor Lifecycle Hooks

Currently editor lifecycle hooks are available by available by extending the mobiledoc-editor component.

```js
import Component from 'ember-mobiledoc-editor/components/mobiledoc-editor/component';

export default Component.extend({
cursorDidChange(editor) {
this._super(...arguments);
// custom event handling goes here
}
});
```

The following lifecycle hooks are available:
* `willRender`
* `didRender`
* `postDidChange`
* `inputModeDidChange`
* `cursorDidChange`

### Test Helpers

Expand Down

0 comments on commit bb87a00

Please sign in to comment.