-
Notifications
You must be signed in to change notification settings - Fork 152
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
Split render from editor instantiation #89
Conversation
@@ -71,7 +71,8 @@ const defaults = { | |||
unknownCardHandler: () => { | |||
throw new Error('Unknown card encountered'); | |||
}, | |||
mobiledoc: null | |||
mobiledoc: null, | |||
pasteInput: null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
html
may be a more obvious name for this. pasteInput
implies that is the result of a copy-paste operation (which needn't be true) and is vague about what the input
is (text, html, dom node, etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dom
felt pretty lame. Bleh, I guess it can be html
and I can make it recognize when DOM is passed instead.
Was adding an option like |
I'd prefer one flow over making immediate render the default case. IMO Having a default render behavior encourages us to be lazy about what things look like before rendering has occurred. Several APIs should fail if you have not yet rendered. Having the editor pre-render allows the user to call configuration methods like |
1ea690c
to
da35287
Compare
da35287
to
6b05a4f
Compare
@bantic let us continue to discuss. I'm going to merge and cut a release to move forward though. |
Split render from editor instantiation
Drop the element argument from editor instantiation.
Should this perhaps be
editor.append
?Fixes #88