Closed LukeTowers closed 1 year ago
I've created a plugin that allows just that:
@der-On cool! Do you have a screenshot of what the UX looks like?
@der-On cool! Do you have a screenshot of what the UX looks like?
Sure:
The plugin also allows to add a preview to any model form with a single line of php code in the plugins register method. The model just needs to implement a preview() method.
@LukeTowers, just pushed a commit to prevent the preview being displayed by default so that people have to "opt in" to using it, any thoughts?
Also I fixed some display issues.
Is there anything else that needs doing before this can be merged?
@jaxwilko any reason why it should be opt-in instead of just always enabled?
@LukeTowers not really, just thought it would make sense for people to opt in
Meh, if it's opt in no one's going to see it. If you can think of a reason why someone would want it disabled then we could look at providing that as an option but at the moment I'm fine leaving it always enabled.
@jaxwilko todo before we can merge:
@jaxwilko todo before we can merge:
- thorough testing of the editing all content types because of the refactor from controller to objecthelper
- look into the todo (https://github.com/wintercms/wn-pages-plugin/pull/19/files#diff-30c49f6ba6a738fbd3fed3c4e7ddacb319ace9478f52ac56ecc56bec67e32ebfR68)
- remove the config option
- remerge in latest main
@LukeTowers all of there points have now been complete, tested everything and it all looks good, just need to add unit tests
@LukeTowers tests now pass :)
This PR adds initial support for a "Preview" tab that presents a live preview of the page currently being edited on the frontend without requiring the page or changes to be saved first.
TODO: