-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
WIP: Html comments for marking content elements and inline editables | Iframe post-message communication | Inline toolbar in host via position observing #3231
Comments
I think I removed already all content scripts tags in a PR as they were not needed anymore since I refactored the content tree. Have to check again. |
Thanks for writing this up @mhsdesign 🚀 . I always have all this stuff floating around in my head and I never get around to writing it down 😅 . Some additions: RE @mhsdesign:
This is what I call "minimally invasive content element wrapping". I'm planning on creating an experimental PR for this soonish. It can be done independently from the other ones and would imho be a huge improvement. RE @mhsdesign:
@mficzel and @dfeyer both have played with the idea of providing our editors (as in Strictly speaking, all inline editors would live in the guest frame, but all would be built from one code base and isolated from other guest frame contents. RE @Sebobo:
I think so too. However, the guest frame still contains a global |
this initial goal of mine doesnt seem to be easily reachable as we initialize the ckeditor from the host. This is important as we can easily register plugins. So for a headless approach we require the use of a proxy to avoid cross origin domain problems. We would feel more confortable with a html comment based api between host and iframe which should also become documented api for the usecase of headless cms. |
Regarding "Minimally Invasive Content Element Wrapping": I've started working on this a while ago (though I'm stuck). In the end there are supposed to be 2 PRs. One's for This one changes the way in which Fusion handles Content Collections. It also creates a basis for a slightly better integration of Content Element Wrapping in general, so that this is no longer done via an Aspect in The second PR's for This one is supposed to handle the parsing of HTML comments and initialization of content element DOM nodes. I've been working in an explorative manner around this, and still haven't settled the overall approach and architecture, but the basic principle is probably visible in the code. |
I'm currently working on dropping the script tags for content nodes completely in #3770 |
This is @grebaldi idea - im just trying to document it ^^
the current state of inline communication could be improved.
currently
Currently, a div is wrapped around the CE to tell the UI which node it came from, and also attaches a script tag that is used for details of the node for the UI.
proposed
3 major improvements which are:
the content element wrapping will consist of gt l comment start and en markers (and doesnt need to wrap a div element if there are multiple roots) The content element outline will be done in the host frame with javascript positioning (where we can calculate the total height of an component)
pro
see what storyblok does
copied from the docs at https://www.storyblok.com/docs/guide/essentials/visual-editor#enabling-click-events-on-your-html-elements:
... wip
contra
The text was updated successfully, but these errors were encountered: