Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update renderer to render cards #17

Closed
12 tasks done
bantic opened this issue Nov 18, 2015 · 0 comments · Fixed by #18
Closed
12 tasks done

update renderer to render cards #17

bantic opened this issue Nov 18, 2015 · 0 comments · Fixed by #18
Assignees

Comments

@bantic
Copy link
Contributor

bantic commented Nov 18, 2015

Update the dom renderer to render cards as described in bustle/mobiledoc-kit#235. Checklist copied from there:

  • Change card shape to object with type, name, render and optional edit properties
  • Card's type is validated by renderer (dom renderer cannot render 'text', e.g.)
  • Change arguments passed by editor to card's render (or edit) method
    • single argument object with env, options and payload properties
  • Return value of card's render (or edit) method is appended/concatenated by renderer
  • card can register teardown callback by calling onTeardown(teardownFn)
  • Change editor-dom renderer to clear child elements from card element on teardown
  • Renderer constructor signature changes to accept options object with: cards, atoms, cardOptions, unknownCardHandler, editor (for editor-dom)
  • Renderer render instance method accepts mobiledoc argument, returns rendered object with 2 props:
    • result property (which is a dom node or string, depending)
    • teardown method with no args tears down rendered mobiledoc (removing dom when applicable, calling registered card teardown callbacks when applicable)
  • unknownCardHandler method is called whenever a renderer encounters an unknown card
  • remove rendered sections from dom on teardown
@bantic bantic self-assigned this Nov 18, 2015
bantic added a commit that referenced this issue Nov 19, 2015
bantic added a commit that referenced this issue Nov 19, 2015
bantic added a commit that referenced this issue Nov 19, 2015
bantic added a commit that referenced this issue Nov 19, 2015
bantic added a commit that referenced this issue Nov 19, 2015
bantic added a commit that referenced this issue Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant