mattmilburn / strapi-plugin-preview-button

A plugin for Strapi CMS that adds a preview button and live view button to the content manager edit view.
MIT License
106 stars 38 forks source link

Suggestion: send messages to opened tab when data changes #126

Open gryphonmyers opened 11 months ago

gryphonmyers commented 11 months ago

The use case is: an editor has both the CMS and the preview URL open. They edit some data in the CMS, and the preview URL automatically updates to reflect their edit.

I believe this could be accommodated with postMessage, so long as we have a reference to the opened tab. This would enable the developer of the frontend preview app to listen for messages coming from the plugin and do a reload or patch the app with the changed data.

mattmilburn commented 10 months ago

Hi @gryphonmyers That's actually a great idea 🙂 I'll keep this pinned so it can be explored later 👍🏻