2012-10-25 13:45:06 +00:00
|
|
|
# Plugin Framework
|
2020-11-13 04:42:07 +00:00
|
|
|
|
2012-10-25 13:45:06 +00:00
|
|
|
`require("ep_etherpad-lite/static/js/plugingfw/plugins")`
|
|
|
|
|
|
|
|
## plugins.update
|
2020-11-13 04:42:07 +00:00
|
|
|
|
|
|
|
`require("ep_etherpad-lite/static/js/plugingfw/plugins").update()` will use npm
|
|
|
|
to list all installed modules and read their ep.json files, registering the
|
|
|
|
contained hooks. A hook registration is a pair of a hook name and a function
|
|
|
|
reference (filename for require() plus function name)
|
2012-10-25 13:45:06 +00:00
|
|
|
|
|
|
|
## hooks.callAll
|
2020-11-13 04:42:07 +00:00
|
|
|
|
|
|
|
`require("ep_etherpad-lite/static/js/plugingfw/hooks").callAll("hook_name",
|
|
|
|
{argname:value})` will call all hook functions registered for `hook_name` with
|
|
|
|
`{argname:value}`.
|
2012-10-25 13:45:06 +00:00
|
|
|
|
|
|
|
## hooks.aCallAll
|
2020-11-13 04:42:07 +00:00
|
|
|
|
2012-10-25 13:45:06 +00:00
|
|
|
?
|
|
|
|
|
|
|
|
## ...
|