Skip to content

Commit

Permalink
Merge pull request #384 from bustlelabs/document-card-did-render
Browse files Browse the repository at this point in the history
[docs] Document card `env.didRender` hook
  • Loading branch information
bantic committed May 5, 2016
2 parents 9433e74 + 3a1edde commit 2ab8d42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ When being rendered by an editor (i.e., `env.isInEditor` is true), the env will
* `cancel` [function] - Called to transition from "edit" to "display" mode without changing the payload. It is a no-op if the card is in display mode already
* `remove` [function] - Removes this card from the document
* `postModel` [object] - The instance of this card's section in the editor's internal abstract tree. This can be used along with the mobiledoc-kit `postEditor` API to transform the card in other ways (for example, moving the card to a different section of the document)
* `didRender` [function] - The card can pass a callback function: `didRender(callbackFn)`. The callback will be called when the card is rendered (on initial render and also after transitioning between display/edit states). This callback can be used to do additional work that must happen after the card's element has been appended to the DOM.

## Card examples

Expand Down

0 comments on commit 2ab8d42

Please sign in to comment.