mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
beginning of a hook, needs docs etc
This commit is contained in:
parent
4ecf0dfad2
commit
372063295f
1 changed files with 13 additions and 0 deletions
|
@ -411,6 +411,18 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
||||||
}
|
}
|
||||||
lists = []
|
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",
|
var lineContentFromHook = hooks.callAllStr("getLineHTMLForExport",
|
||||||
{
|
{
|
||||||
line: line,
|
line: line,
|
||||||
|
@ -419,6 +431,7 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
||||||
attribLine: attribLines[i],
|
attribLine: attribLines[i],
|
||||||
text: textLines[i]
|
text: textLines[i]
|
||||||
}, " ", " ", "");
|
}, " ", " ", "");
|
||||||
|
|
||||||
if (lineContentFromHook)
|
if (lineContentFromHook)
|
||||||
{
|
{
|
||||||
pieces.push(lineContentFromHook, '');
|
pieces.push(lineContentFromHook, '');
|
||||||
|
|
Loading…
Reference in a new issue