diff --git a/node/ReadOnlyManager.js b/node/ReadOnlyManager.js index de2c64446..3c90d9caf 100644 --- a/node/ReadOnlyManager.js +++ b/node/ReadOnlyManager.js @@ -60,6 +60,15 @@ exports.getReadOnlyId = function (padId, callback) }) } +/** + * returns a the padId for a read only id + * @param {String} readOnlyId read only id + */ +exports.getPadId = function(readOnlyId, callback) +{ + db.get("readonly2pad:" + readOnlyId, callback); +} + /** * Generates a random String with the given length. Is needed to generate the read only ids */ diff --git a/node/exporters/exporthtml.js b/node/exporters/exporthtml.js index 7b412d147..335d72128 100644 --- a/node/exporters/exporthtml.js +++ b/node/exporters/exporthtml.js @@ -15,6 +15,7 @@ */ var async = require("async"); var Changeset = require("../Changeset"); +var padManager = require("../PadManager"); function getPadPlainText(pad, revNum) { @@ -307,22 +308,33 @@ function _analyzeLine(text, aline, apool) { return line; } -function getPadHTMLDocument(pad, revNum, noDocType, callback) { - var head = (noDocType?'':'\n')+ '\n'+ (noDocType?'': '
\n'+ '\n'+ '\n'+ - '