mirror of
https://github.com/zadam/trilium.git
synced 2025-01-01 04:41:46 +08:00
fix pasting HTML content into subnotes
This commit is contained in:
parent
492fde6f46
commit
8b41c1ef31
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue