docs: Document the `import` server-side hook

pull/5260/head
Richard Hansen 2021-11-05 17:08:17 -04:00
parent cc4772a99e
commit edf99dc811
1 changed files with 14 additions and 0 deletions

View File

@ -807,6 +807,20 @@ Example:
exports.exportEtherpadAdditionalContent = () => ['comments']; exports.exportEtherpadAdditionalContent = () => ['comments'];
``` ```
## `import`
Called from: `src/node/handler/ImportHandler.js`
Called when a user submits a document for import, before the document is
converted to HTML. The hook function should return `undefined` (or an empty
list) if it did NOT convert convert the document to HTML.
Context properties:
* `destFile`: The destination HTML filename.
* `fileEnding`: The lower-cased filename extension from `srcFile`.
* `srcFile`: The document to convert.
## `userJoin` ## `userJoin`
Called from: `src/node/handler/PadMessageHandler.js` Called from: `src/node/handler/PadMessageHandler.js`