colonel-kurtz
colonel-kurtz copied to clipboard
Preview Mode
?
We decided that CK shouldn't do a preview mode because it ultimately isn't responsible for rendering content.
Our first attempt used a double-buffered iframe on form change to "live reload" a page whenever something changed. It worked pretty decently:
https://github.com/vigetlabs/active_versioning_workflow/blob/live-preview/app/assets/javascripts/active_versioning/live-preview.js
This can actually be really simple and effective if you do things like restore scroll.
I recall this work and it makes sense to me for CK not to provide a complete solution to this. I was thinking there might be some machinery that makes sense to include inside CK (similar to the solution you shared above) to facilitate easier integration of this feature on projects.