summaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2012-08-12 08:48:10 -0700
committerJohn McLear <john@mclear.co.uk>2012-08-12 08:48:10 -0700
commita42b2440baf9e89831b15d2b8a8d56cbd330ee69 (patch)
treeee517d395a2af7554deeea53218f978e895e8f67 /src/node
parentaa986ab9544f01d0ac1611b97ab8be73c32c5992 (diff)
parente9b22e8ac39000b641d951608c30a265f3e7ece1 (diff)
downloadetherpad-lite-a42b2440baf9e89831b15d2b8a8d56cbd330ee69.zip
Merge pull request #943 from gedion/develop
Add a hook for utils/ExportHtml.js
Diffstat (limited to 'src/node')
-rw-r--r--src/node/utils/ExportHtml.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js
index 9e43229b..35403013 100644
--- a/src/node/utils/ExportHtml.js
+++ b/src/node/utils/ExportHtml.js
@@ -20,7 +20,7 @@ var Changeset = require("ep_etherpad-lite/static/js/Changeset");
var padManager = require("../db/PadManager");
var ERR = require("async-stacktrace");
var Security = require('ep_etherpad-lite/static/js/security');
-
+var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
function getPadPlainText(pad, revNum)
{
var atext = ((revNum !== undefined) ? pad.getInternalRevisionAText(revNum) : pad.atext());
@@ -401,8 +401,22 @@ function getHTMLFromAtext(pad, atext)
pieces.push('</li></ul>');
}
lists.length--;
- }
- pieces.push(lineContent, '<br>');
+ }
+ var lineContentFromHook = hooks.callAllStr("getLineHTMLForExport",
+ {
+ line: line,
+ apool: apool,
+ attribLine: attribLines[i],
+ text: textLines[i]
+ }, " ", " ", "");
+ if (lineContentFromHook)
+ {
+ pieces.push(lineContentFromHook, '');
+ }
+ else
+ {
+ pieces.push(lineContent, '<br>');
+ }
}
}