Preview of entries before publication

Registered by JW

It would be helpful to be able to view a preview of an entry before it gets published. Currently, this is possibly by manually surfing to the future location of the entry when being logged in, but a link to this preview should be available in the "Write post" page.

Blueprint information

Status:
Complete
Approver:
JW
Priority:
Medium
Drafter:
James
Direction:
Approved
Assignee:
James
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
James
Completed by
JW

Sprints

Whiteboard

Perhaps a 'live preview' would be nice which uses AJAX to render instantly what is written using styles imported from the style sheet.
James has proposed this option and would be happy to integrate this into the next release upon authorisation from JW
*******************
I think it would be best that the preview would look as close as possible to the end result. I think a preview in an iframe (as WordPress for example does) would be a good idea. You could load it 'live', but the problem with that is what to do with Textile markup/HTML in the entry/... What do you think/propose?
*******************
iFrames are depreciated and i'm not a big fan... i implemented a 'live preview' based on the one found in the book 'rails recipes' and found on the 'typesphere.org' site. This worked well when it was styled with css to look like a live entry however did not work with textile/markup/html. An option is to use the 'textilize' method however i know little about this.

The AJAX call is made to another RHTML page which is pulled into the 'write' interface. If we could get the text to display formatted by redcloth in this rhtml page then surely it would be displayed correctly in the 'write' interface and thus work correctly.

On a separate note, many of my users found the textile/markup format too difficult to understand and so i integrated a simple (ugly) jQuery 'wysiwyg' editor. Perhaps this sort of thing is something to be considered in future development?

James replied to this idea at 17.16 GMT 5/3/08.
*******************
OK, James, this seems like a good idea. Formatting the text correctly shouldn't be an issue, sending the selected formatting with the text should be enough (at least for Textile/Markdown, for HTML I think you can use the sanitize() helper that's in Rails). So, it's definitely something that could be implemented in one of the next versions of Chameleon.

The WYSIWYG editor might also be a good idea, the formatting might indeed be not that easy to understand. Maybe, then, we should also make the preview an option, because when you're using such an editor you don't need a preview. So, that editor is also something to consider, for later.
JW, 6/03/2008
*******************
Yea that makes sense JW, the preview is by no means a key feature after all. There is always the added option of viewing it in the pre-published state.
Placed on the back-burner by JW for fruition in a later release.
*******************
James, I didn't really mean to say that this idea should be postponed when I said that this could be done "in one of the next versions". In fact, a preview function is one of the things I really miss in Chameleon. When I started this proposal, I was however just thinking to add an iframe to the 'write' page, with as 'src' element the URL of the draft entry. Adding that should be really easy. If you want to do add a 'live preview', feel free to do so, else I'll add a simpler preview, it depends on what amount of time you or I want to spend on it.
JW, 6/03/2008
*******************
Sorry I assumed you had decided to postpone this feature. I will quite happily implement the live preview that I we spoke about above... I should be able to merge the code with the 'auto-save' feature. If we plan to do it we might as well do it right first time.

I have downloaded bazaar however I need some direction as to how to get access to the files. I am in the proccess of reading the User Guide and i assume we will be using the 'Decentralized with human gatekeeper' model with you checking everything?
I've never used a version control system before i'm afraid so i'm a bit of a noob when it comes to this. If you could email me any assistance you can provide it would be greatly received (Jamesosb [at] bigfoot [dot] com - However it is routed to gmail if you wanted to use the chat function on there).
Clarified by JW and accepted by James 6/3/2008
*******************
I sent you the email. JW, 6/3/2008
*******************
This blueprint was completed on 7/3/2008 by James
Awaiting sign-off by JW.
*******************
This blueprint was uploaded and a request sent for a merge with the trunk on 9/3/08 by James.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.