diff options
author | John McLear <john@mclear.co.uk> | 2014-11-26 15:19:22 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2014-11-26 15:19:22 +0000 |
commit | 0a84379364c76a43fbab4c48af08346ff54a179d (patch) | |
tree | 6df4ec637b6c26544e705f5497c685d5782a2c42 /src | |
parent | 8851b8ab6b250232d7e8cd7ce2e8500258a34325 (diff) | |
download | etherpad-lite-0a84379364c76a43fbab4c48af08346ff54a179d.zip |
make additional line break at end of imported doc
Diffstat (limited to 'src')
-rw-r--r-- | src/node/utils/ImportHtml.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/node/utils/ImportHtml.js b/src/node/utils/ImportHtml.js index 34e9ad76..59802f9b 100644 --- a/src/node/utils/ImportHtml.js +++ b/src/node/utils/ImportHtml.js @@ -24,8 +24,12 @@ function setPadHTML(pad, html, callback) var apiLogger = log4js.getLogger("ImportHtml"); var $ = cheerio.load(html); - var doc = $('html')[0]; + // Appends a line break, used by Etherpad to ensure a caret is available + // below the last line of an import + $('body').append("<p></p>"); + + var doc = $('html')[0]; apiLogger.debug('html:'); apiLogger.debug(html); |