Manual:Hooks/AlternateEditPreview

Details

 * $editor: EditPage instance
 * &$content: Content object for the text field from the edit page
 * &$previewHTML: Text to be placed into the page for the preview
 * &$parserOutput: the ParserOutput object for the preview

Return true to continue with the normal page preview, or false to use the values set in &$previewHTML and &$parserOutput.

Purpose
This hook is called at the beginning of getPreviewText when the page is being previewed during &action=edit. This can be used to replace the normal edit preview by setting the HTML to be output as the preview into &$previewHTML and the ParserOutput object into &$parserOutput, and then returning false.

Note that $editor->previewTextAfterContent is not automatically appended to &$previewHTML; the hook function must do this itself if this is should be included.