Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/EditPageGetPreviewContent

From mediawiki.org
<Manual:Hooks
EditPageGetPreviewContent
Available fromversion 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:
publicstaticfunctiononEditPageGetPreviewContent($editPage,&$content){...}
Attach hook:Inextension.json:
{"Hooks":{"EditPageGetPreviewContent":"MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageGetPreviewContent"}}
Called from:File(s):EditPage.php
Interface:EditPageGetPreviewContentHook.php

For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:EditPageGetPreviewContent extensions.


Details

[edit]
  • $editPage: The EditPage object
  • &content: Content object to be previewed (may be replaced by hook function)
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/EditPageGetPreviewContent&oldid=6933731"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp