-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Custom preview url #169
Comments
Hi there 👋🏻 I was actually trying to implement an ifame preview a few months ago. There were some issues, but will take a look again. |
Great! Thank you very much. I'm not too familiar with the underlying structure, but I noticed that Here's what I basically achieved and want to reproduce with Sveltia CMS:
If this becomes part of the project for official support, that would be even better! |
Yeah,
Will dive into it further. |
As you can see in my old example, with NetlifyCMS you had access to the current editing data. Not sure if this is available in Sveltia.
Since the preview is rendered with an iframe, you can access a variable in the parent's iframe DOM's This way, there's no need for the CMS to refresh or rerender anything, especially not on each keystroke. On the user project side, for standardization and ease of use, the polling of the content on the preview page could be hidden behind a utility function in a module or SDK. |
I've just discovered this project and I'm delighted about it. We are big fans of Svelte and we also used Netlify/Decap CMS in some of our projects. Having a preview was always one of the features we missed the most… I think an iframe should work, but I would suggest to use the I imagine something like this:
I think this would be an approach that should work with quite a lot of stacks/frameworks/etc. |
@kyoshino , I landed here straight from google looking for the same thing. Has something like this already been added? It would be great to render some style on top of the bare preview pane. If there's a registered open issue assigned to this feature request, I'd love to follow it. |
Not yet implemented. I’ll work on it in a few months and close this ticket once done 🙂 |
A couple of years ago I've managed to run Decap CMS with custom preview links (iframe + passing data to it):
decaporg/decap-cms#2183 (comment)
Would something similar be possible today with sceltia-cms ?
The text was updated successfully, but these errors were encountered: