From 6c89a635bb0715fd06b0061692fe39b3e79fcad7 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 26 Aug 2007 21:33:25 +0000 Subject: * Add an editcontent hook. --- doc/plugins/write.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index d09367f1b..0c192eb64 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -251,6 +251,17 @@ by this hook, the hook should return an error message for the user to see. If the hook has no opinion about whether the edit can proceed, return `undef`, and the next plugin will be asked to decide. +### editcontent + + hook(type => "editcontent", id => "foo", call => \&editcontent); + +This hook is called when a page is saved (or previewed) using the web +interface. It is passed named parameters: `content`, `page`, `cgi`, and +`session`. These are, respectively, the new page content as entered by the +user, the page name, a `CGI` object, and the user's `CGI::Session`. + +It can modify the content as desired, and should return the content. + ### formbuilder hook(type => "formbuilder_setup", id => "foo", call => \&formbuilder_setup); -- cgit v1.2.3