mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
ImportHtml: Wait for HTML processing to complete
This commit is contained in:
parent
50dce085c2
commit
abf4eeeb17
1 changed files with 1 additions and 4 deletions
|
@ -26,10 +26,7 @@ const apiLogger = log4js.getLogger('ImportHtml');
|
||||||
const processor = rehype().use(minifyWhitespace, {newlines: false});
|
const processor = rehype().use(minifyWhitespace, {newlines: false});
|
||||||
|
|
||||||
exports.setPadHTML = async (pad, html) => {
|
exports.setPadHTML = async (pad, html) => {
|
||||||
processor.process(html, (err, output) => {
|
html = String(await processor.process(html));
|
||||||
html = String(output);
|
|
||||||
});
|
|
||||||
|
|
||||||
const {window: {document}} = new jsdom.JSDOM(html);
|
const {window: {document}} = new jsdom.JSDOM(html);
|
||||||
|
|
||||||
// Appends a line break, used by Etherpad to ensure a caret is available
|
// Appends a line break, used by Etherpad to ensure a caret is available
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue