< Manual:Hooks
CustomEditor
Available from version 1.9.1
When invoking the page editor. Return true to allow the normal editor to be used, or false if implementing a custom editor, e.g. for a special namespace, etc.
Define function:
public static function onCustomEditor( Page $page, User $user ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"CustomEditor": "MyExtensionHooks::onCustomEditor"
	}
}
Called from: File(s): actions/EditAction.php
Interface: CustomEditorHook.php

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

Details

  • $page - Page being edited
  • $user - User performing the edit
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.