< Manual:Hooks
EditPageGetPreviewContent | |
---|---|
Available from version 1.21.0 Allow modifying the wikitext that will be previewed. Note that it is preferable to implement previews for different data types using the ContentHandler facility. | |
Define function: | public static function onEditPageGetPreviewContent( $editPage, &$content ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"EditPageGetPreviewContent": "MyExtensionHooks::onEditPageGetPreviewContent"
}
}
|
Called from: | File(s): EditPage.php |
Interface: | EditPageGetPreviewContentHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:EditPageGetPreviewContent extensions.
Details
- $editPage: The EditPage object
- &content: Content object to be previewed (may be replaced by hook function)
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.