summaryrefslogtreecommitdiff
path: root/src/node/utils
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2015-01-24 04:09:13 +0000
committerJohn McLear <john@mclear.co.uk>2015-01-24 04:09:13 +0000
commit372063295f54990c0bfcb9a29483e92961ae274b (patch)
tree98875d4da660936b7e464ea3a0c387ad7079123f /src/node/utils
parent4ecf0dfad2636a7d4d73dcda1bb51d1ad1a7eec7 (diff)
downloadetherpad-lite-372063295f54990c0bfcb9a29483e92961ae274b.zip
beginning of a hook, needs docs etc
Diffstat (limited to 'src/node/utils')
-rw-r--r--src/node/utils/ExportHtml.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js
index 0bb93326..81fc0be9 100644
--- a/src/node/utils/ExportHtml.js
+++ b/src/node/utils/ExportHtml.js
@@ -411,6 +411,18 @@ function getHTMLFromAtext(pad, atext, authorColors)
}
lists = []
+ hooks.aCallAll("asyncLineHTMLForExport", {
+ line: line,
+ lineContent: lineContent,
+ apool: apool,
+ attribLine: attribLines[i],
+ text: textLines[i]
+ }, function(err, newLineContent){
+ if(newLineContent.length !== 0) lineContent = newLineContent[0];
+ // modified lineContent here
+ });
+
+ // Old hook probably not to be used..
var lineContentFromHook = hooks.callAllStr("getLineHTMLForExport",
{
line: line,
@@ -419,6 +431,7 @@ function getHTMLFromAtext(pad, atext, authorColors)
attribLine: attribLines[i],
text: textLines[i]
}, " ", " ", "");
+
if (lineContentFromHook)
{
pieces.push(lineContentFromHook, '');