mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
pluginfw: Export .etherpad hooks (#4466)
* export support * proper prefix * just a basic example, needs working on still * docs * comments shouldnt be hard coded
This commit is contained in:
parent
d5c5ca224b
commit
3fa58efede
3 changed files with 42 additions and 0 deletions
|
@ -751,6 +751,21 @@ exports.exportHtmlAdditionalTagsWithData = function(hook, pad, cb){
|
|||
};
|
||||
```
|
||||
|
||||
## exportEtherpadAdditionalContent
|
||||
Called from src/node/utils/ExportEtherpad.js and src/node/utils/ImportEtherpad.js
|
||||
|
||||
Things in context:
|
||||
|
||||
Useful for exporting and importing non-pad centric data stored about a pad. For example in ep_comments_page the comments are stored as comments:padId:uniqueIdOfComment and as such when you export .etherpad this data is not included.
|
||||
|
||||
Example:
|
||||
```
|
||||
// Add support for exporting comments metadata
|
||||
exports.exportEtherpadAdditionalContent = function(hook_name, context, callback){
|
||||
return callback(["comments"]);
|
||||
};
|
||||
```
|
||||
|
||||
## userLeave
|
||||
Called from src/node/handler/PadMessageHandler.js
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue