fix pasting HTML content into subnotes

This commit is contained in:
azivner 2018-09-07 10:26:23 +02:00
parent 492fde6f46
commit 8b41c1ef31

View file

@ -530,8 +530,8 @@ function parseSelectedHtml(selectedHtml) {
if (dom.length > 0 && dom[0].tagName && dom[0].tagName.match(/h[1-6]/i)) {
const title = $(dom[0]).text();
const domWithoutTitle = dom.slice(1);
const content = domWithoutTitle.map(el => $(el).html()).join("");
// remove the title from content (only first occurence)
const content = selectedHtml.replace(dom[0].outerHTML, "");
return [title, content];
}