Compare commits
2 Commits
develop
...
export-htm
Author | SHA1 | Date |
---|---|---|
John McLear | 94d49aed8e | |
John McLear | 3b6c8dce2f |
|
@ -661,6 +661,24 @@ function _analyzeLine(alineAttrs, apool) {
|
|||
}
|
||||
```
|
||||
|
||||
## exportHTMLAdditionalContent
|
||||
Called from: src/node/utils/ExportHtml.js
|
||||
|
||||
Things in context:
|
||||
|
||||
1. padId
|
||||
|
||||
This hook will allow a plug-in developer to include additional HTML content in the Body of the exported HTML
|
||||
|
||||
Example:
|
||||
```
|
||||
exports.exportHTMLAdditionalContent = async (hookName, context) => {
|
||||
let padId = context;
|
||||
return "I am groot in " + padId;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## stylesForExport
|
||||
Called from: src/node/utils/ExportHtml.js
|
||||
|
||||
|
|
|
@ -498,6 +498,11 @@ exports.getPadHTMLDocument = async function (padId, revNum)
|
|||
|
||||
let html = await getPadHTML(pad, revNum);
|
||||
|
||||
let exportHTMLAdditionalContent = await hooks.aCallAll("exportHTMLAdditionalContent", padId);
|
||||
exportHTMLAdditionalContent.forEach(function(hookHtml){
|
||||
html += hookHtml;
|
||||
});
|
||||
|
||||
return eejs.require("ep_etherpad-lite/templates/export_html.html", {
|
||||
body: html,
|
||||
padId: Security.escapeHTML(padId),
|
||||
|
|
Loading…
Reference in New Issue