ParsoidParser: Record ParserOptions watcher on ParserOutput object
[mediawiki.git] / includes / Hook / AlternateEditPreviewHook.php
blob529a4331685acd2c34e4f114a1a7a266ad889de9
1 <?php
3 namespace MediaWiki\Hook;
5 use Content;
6 use MediaWiki\EditPage\EditPage;
7 use ParserOutput;
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "AlternateEditPreview" to register handlers implementing this interface.
13 * @stable to implement
14 * @ingroup Hooks
16 interface AlternateEditPreviewHook {
17 /**
18 * This hook is called before generating the preview of the page when editing
19 * ( EditPage::getPreviewText() ).
21 * @since 1.35
23 * @param EditPage $editPage
24 * @param Content &$content Content object for the text field from the edit page
25 * @param string &$previewHTML Text to be placed into the page for the preview
26 * @param ParserOutput &$parserOutput ParserOutput object for the preview
27 * @return bool|void True or no return value to continue, or false and set $previewHTML and
28 * $parserOutput to output custom page preview HTML
30 public function onAlternateEditPreview( $editPage, &$content, &$previewHTML,
31 &$parserOutput