docs
parent
6080de9d79
commit
2218cbd252
|
@ -247,6 +247,23 @@ Things in context:
|
||||||
|
|
||||||
This hook will allow a plug-in developer to re-write each line when exporting to HTML.
|
This hook will allow a plug-in developer to re-write each line when exporting to HTML.
|
||||||
|
|
||||||
|
## stylesForExport
|
||||||
|
Called from: src/node/utils/ExportHtml.js
|
||||||
|
|
||||||
|
Things in context:
|
||||||
|
|
||||||
|
1. padId - The Pad Id
|
||||||
|
|
||||||
|
This hook will allow a plug-in developer to append Styles to the Exported HTML.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
exports.stylesForExport = function(hook, context){
|
||||||
|
return("body{margin-left:20px;body{color:orange}");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## exportFileName
|
## exportFileName
|
||||||
Called from src/node/handler/ExportHandler.js
|
Called from src/node/handler/ExportHandler.js
|
||||||
|
|
||||||
|
|
|
@ -425,6 +425,9 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
|
||||||
{
|
{
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
|
|
||||||
|
// Include some Styles into the Head for Export
|
||||||
|
var stylesForExport = hooks.callAllStr("stylesForExport") || ''
|
||||||
|
|
||||||
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' +
|
||||||
|
@ -442,6 +445,7 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
|
||||||
'ol ol ol ol ol ol{ list-style-type: lower-roman; }' +
|
'ol ol ol ol ol ol{ list-style-type: lower-roman; }' +
|
||||||
'ol ol ol ol ol ol ol { list-style-type: decimal; }' +
|
'ol ol ol ol ol ol ol { list-style-type: decimal; }' +
|
||||||
'ol ol ol ol ol ol ol ol{ list-style-type: lower-latin; }' +
|
'ol ol ol ol ol ol ol ol{ list-style-type: lower-latin; }' +
|
||||||
|
stylesForExport +
|
||||||
'</style>\n' + '</head>\n') +
|
'</style>\n' + '</head>\n') +
|
||||||
'<body>';
|
'<body>';
|
||||||
|
|
||||||
|
@ -452,6 +456,7 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
callback(null, head + html + foot);
|
callback(null, head + html + foot);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue