colonel-kurtz icon indicating copy to clipboard operation
colonel-kurtz copied to clipboard

Preview Mode

Open solomonhawk opened this issue 4 years ago • 2 comments

?

solomonhawk avatar May 11 '20 19:05 solomonhawk

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.

nhunzaker avatar May 11 '20 20:05 nhunzaker

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.

solomonhawk avatar May 12 '20 17:05 solomonhawk