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 editor-dom renderer for card rendering #236

Closed
9 of 13 tasks
bantic opened this issue Nov 18, 2015 · 0 comments · Fixed by #238
Closed
9 of 13 tasks

Update editor-dom renderer for card rendering #236

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

Comments

@bantic
Copy link
Collaborator

bantic commented Nov 18, 2015

see #235

  • 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) (not applicable since the editor-dom renderer is managed internally by mobiledoc-kit)
  • 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
  • editor.destroy() calls all card teardown callbacks
bantic added a commit that referenced this issue Nov 18, 2015
bantic added a commit that referenced this issue Nov 19, 2015
This is based on the changes to mobiledoc-dom-renderer in
bustle/mobiledoc-dom-renderer#18

This allows rendering, but the cards themselves don't render yet
because ember-mobiledoc-editor doesn't use the updates to mobiledoc-kit
from #238

wip refs #236
bantic added a commit that referenced this issue Nov 23, 2015
Update cards to be in format expected by dom renderer

This is based on the changes to mobiledoc-dom-renderer in
bustle/mobiledoc-dom-renderer#18

Reorganize cards into dom/ html/ and text/ directories

fixes #236
fixes #239
bantic added a commit that referenced this issue Nov 23, 2015
Update cards to be in format expected by dom renderer

This is based on the changes to mobiledoc-dom-renderer in
bustle/mobiledoc-dom-renderer#18

Reorganize cards into dom/ html/ and text/ directories

fixes #236
fixes #239
bantic added a commit that referenced this issue Nov 23, 2015
Update cards to be in format expected by dom renderer

This is based on the changes to mobiledoc-dom-renderer in
bustle/mobiledoc-dom-renderer#18

Reorganize cards into dom/ html/ and text/ directories

fixes #236
fixes #239
bantic added a commit that referenced this issue Nov 23, 2015
Update cards to be in format expected by dom renderer

This is based on the changes to mobiledoc-dom-renderer in
bustle/mobiledoc-dom-renderer#18

Reorganize demo cards into dom/ html/ and text/ directories

fixes #236
fixes #239
bantic added a commit that referenced this issue Nov 23, 2015
Update cards to be in format expected by dom renderer

This is based on the changes to mobiledoc-dom-renderer in
bustle/mobiledoc-dom-renderer#18

Reorganize demo cards into dom/ html/ and text/ directories

fixes #236
fixes #239

Update html and text renderer dependencies
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