summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-26 21:33:25 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-26 21:33:25 +0000
commit6c89a635bb0715fd06b0061692fe39b3e79fcad7 (patch)
tree13b2c665fdb30a534aa33ed83abba0d308f4e7b1 /doc/plugins
parent68db2dceb87a83e2bfa201dc52cc48c9b389c403 (diff)
* Add an editcontent hook.
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/write.mdwn11
1 files changed, 11 insertions, 0 deletions
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);