Manual:Hooks/EditPageGetPreviewText

EditPageGetPreviewText
Available from version 1.16.0 (r62740, CodeReview archive)
Removed in version 1.29.0
Allow modifying the wikitext that will be previewed
Define function:
public static function onEditPageGetPreviewText( $editPage, &$toparse ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"EditPageGetPreviewText": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageGetPreviewText"
	}
}
Called from: File(s): EditPage.php
Interface: EditPageGetPreviewTextHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:EditPageGetPreviewText extensions.


Details

edit
  • $editPage: The EditPage object
  • &$toparse: wikitext that will be parsed