mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46: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});
|
||||
|
||||
exports.setPadHTML = async (pad, html) => {
|
||||
processor.process(html, (err, output) => {
|
||||
html = String(output);
|
||||
});
|
||||
|
||||
html = String(await processor.process(html));
|
||||
const {window: {document}} = new jsdom.JSDOM(html);
|
||||
|
||||
// Appends a line break, used by Etherpad to ensure a caret is available
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue