Available from version 1.16.0
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": "MyExtensionHooks::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.


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