views:

18

answers:

1

I would like to collect your ideas on the following:

SharePoint 2010 (and 2007) does have a preview button... while you are editing a publishing page you can switch to the "Page" tab and hit the Preview button: The ribbon in SharePoint 2010 when editing a publishing page Clicking this button does some magic to save your data, and opens a new window where the preview page is displayed. Nice, but could be better. What I would like is live update on editing of field controls from the edit page on the preview page.

My thoughts on this is are as follows:

  • Field types have an ID. For rendering the field values on your preview page, subclass from the standard FieldValue control, and render a span with the same ID around the field value html. So if we have the text ABC in the content editable div of a RichTextFiled X, render the field value as ABC in the display output (for example using EditModePanels for Display and Edit)
  • Add key-stroke event handler on all fields for the edit mode page (using for example jQuery), on key press copy contents from edit browser window to preview browser window
  • Transfer can be done using http://www.sfpeter.com/2008/03/13/communication-between-browser-windows-with-jquery-my-new-plugin/.

Does this sound doable? Would be great to work dual monitor, edit on one monitor, preview page in its real rendering on the other monitor. Especially if the edit mode differs from the display mode.

Looking forward to your input!

A: 

I will answer my own question. It is not as easy as its sounds. Fields can use things like reusable content and render patterns. These features render at server side, and change the output. This would require postbacks, which renders the whole thing useless. Lets stay with the already available preview button.

Serge van den Oever