Added a hook for util/ExportHtml.js
parent
d59956b7da
commit
df7d7769c8
|
@ -20,7 +20,7 @@ var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||||
var padManager = require("../db/PadManager");
|
var padManager = require("../db/PadManager");
|
||||||
var ERR = require("async-stacktrace");
|
var ERR = require("async-stacktrace");
|
||||||
var Security = require('ep_etherpad-lite/static/js/security');
|
var Security = require('ep_etherpad-lite/static/js/security');
|
||||||
|
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
||||||
function getPadPlainText(pad, revNum)
|
function getPadPlainText(pad, revNum)
|
||||||
{
|
{
|
||||||
var atext = ((revNum !== undefined) ? pad.getInternalRevisionAText(revNum) : pad.atext());
|
var atext = ((revNum !== undefined) ? pad.getInternalRevisionAText(revNum) : pad.atext());
|
||||||
|
@ -401,8 +401,21 @@ function getHTMLFromAtext(pad, atext)
|
||||||
pieces.push('</li></ul>');
|
pieces.push('</li></ul>');
|
||||||
}
|
}
|
||||||
lists.length--;
|
lists.length--;
|
||||||
}
|
}
|
||||||
pieces.push(lineContent, '<br>');
|
var newLineContent = hooks.callAllStr("getLineHTMLForExport",
|
||||||
|
{
|
||||||
|
line: line,
|
||||||
|
apool: apool,
|
||||||
|
attribLine: attribLines[i],
|
||||||
|
text: textLines[i]
|
||||||
|
}, " ", " ", "");
|
||||||
|
if (newLineContent)
|
||||||
|
{
|
||||||
|
pieces.push(newLineContent, '');
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
pieces.push(lineContent, '<br>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,6 +482,7 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
|
||||||
var head =
|
var head =
|
||||||
(noDocType ? '' : '<!doctype html>\n') +
|
(noDocType ? '' : '<!doctype html>\n') +
|
||||||
'<html lang="en">\n' + (noDocType ? '' : '<head>\n' +
|
'<html lang="en">\n' + (noDocType ? '' : '<head>\n' +
|
||||||
|
'<title>' + Security.escapeHTML(padId) + '</title>\n' +
|
||||||
'<meta charset="utf-8">\n' +
|
'<meta charset="utf-8">\n' +
|
||||||
'<style> * { font-family: arial, sans-serif;\n' +
|
'<style> * { font-family: arial, sans-serif;\n' +
|
||||||
'font-size: 13px;\n' +
|
'font-size: 13px;\n' +
|
||||||
|
|
Loading…
Reference in New Issue