Live Previews for content editing #4
louisescher
started this conversation in
Proposal
Replies: 3 comments 3 replies
-
|
/consensus |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
My only concern is ensuring it works across different rendering plugins if its going to be part of the core rendering pipeline. as long as you can ensure this, then i have no issues here. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I like this proposal, a few things i'm wondering:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Summary
A feature that a lot of CMSs provide for their users is a live preview of the content they're editing on the page that will eventually display the content. StudioCMS could massively benefit from this, and there are multiple ways of implementing such a system in a way for plugins to hook into.
Background & Motivation
Content Management Systems, for example Payload, allow you to edit the content on a page while previewing it, giving you a better feeling for how the content will end up looking on the eventual webpage. The disconnect between rich text editor and web page can often be quite large, not only in regards to fonts and text size but also in regards to how images are displayed. Being able to view the content as you're editing it would be an incredible improvement to the user experience.
Goals
Example
I have created an example of a very simple yet effective method using iframes. This system uses the little-known XPath API to find text that contains a comment on a page and then communicates changes in that text between the iframe and the editor by posting messages between the windows.
https://github.com/louisescher/iframe-poc
Alternatives
A member of the community has pointed out two alternatives to the XPath approach:
@vercel/stega: Hiding information within the text itself using stegonographyBeta Was this translation helpful? Give feedback.
All reactions