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

Add env to atom component #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

knownasilya
Copy link

@knownasilya knownasilya commented Apr 6, 2017

This allows the component to control things like env.save(value, payload) to trigger a rerender of the atom or to handle teardown.

@knownasilya
Copy link
Author

Ping

@bantic
Copy link
Contributor

bantic commented Aug 22, 2017

@knownasilya Sorry for the delay. Thanks for submitting. I don't think we had previously considered that the cards or atoms in a mobiledoc would remain "live" after rendered by ember-mobiledoc-dom-renderer. I am pleasantly surprised that this works. :)
Are you wanting to call env.save so that you can update the mobiledoc JSON output? And/or is there a reason that you couldn't modify the Ember component's properties to effect a change in the rendered template? That was more the expectation for this dom renderer.

@palcisto
Copy link

palcisto commented Mar 15, 2018

@knownasilya @bantic Could this PR be modified to also pass the env to the card component? I am in a situation where I am trying to leverage env.isInEditor in my Card component per the mobledoc Card API. Or would it be better to create a new PR to add that functionality?

@knownasilya
Copy link
Author

@bantic it was to save the json of the atom.

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 this pull request may close these issues.

3 participants