-
Notifications
You must be signed in to change notification settings - Fork 48
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
Fastboot compatibility #50
Comments
(ref #51). Does that fix this issue, or do you see additional fastboot-related incompatibilities? |
That's a start but more work is needed. I think we will need to swap the DOM renderer out and the HTML renderer in. |
Neat. @ef4 this package should not be requiring the mobiledoc-dom-renderer, instead it has its own bespoke editor that handles cursor edge cases, etc. The HTML renderer would work, but we're also having good experience using the DOM renderer with simple-dom. Cards are just simple-dom compatible, and therefore work with browser DOM apis or can be converted into strings. It seems easier than writing a card once as DOM and once as HTML. Of course if you plan to render Ember components for document display, you're basically already doing that, just Ember is using simple dom for you. |
Then I think the work that's needed is ensuring that this package's bespoke editor always goes through simple DOM. I will work on that. |
And/or that the instantiation of the editor itself is not executed during fastboot (b/c of what hooks are used). I think that would be the ideal, you don't want the editor itself to execute on the server. |
So what thing exported by mobiledoc-kit would do the rendering instead of (This is why I thought I would need to import something like the html renderer.) |
@ef4 What is your goal for FastBoot? That the editor's DOM is renderered, or just that the FWIW, the editor DOM is not the same as the HTML/DOM rendered by mobiledoc-html-renderer or mobiledoc-dom-renderer. I just want to make sure you're not using the editor to render content to non-editors (something the renderers should be used for). |
I want the DOM rendered correctly, same as it would if it rendered in the For non-editors, I will also need to create an Ember component to wrap the
|
It looks like some work is needed to make this addon fastboot-compatible. It currently fails at boot time when it hits
require("mobiledoc-kit")["registerGlobal"](window, document);
inmobiledoc-kit
's globals build.The text was updated successfully, but these errors were encountered: