Manual:Hooks/EditFilterMerged

Details
Return false to halt editing; you'll need to handle error messages, etc. yourself. Alternatively, modifying $error and returning true will cause the contents of $error
 * $editor: EditPage instance (object)
 * $text: content of the edit box
 * $error: error message to return