mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 01:06:36 +01:00
attachments WIP
This commit is contained in:
@@ -396,11 +396,11 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
}));
|
||||
|
||||
if (notes.length === 1) {
|
||||
linkService.createNoteLink(notes[0].noteId, {referenceLink: true})
|
||||
linkService.createLink(notes[0].noteId, {referenceLink: true})
|
||||
.then($link => data.dataTransfer.setData("text/html", $link[0].outerHTML));
|
||||
}
|
||||
else {
|
||||
Promise.all(notes.map(note => linkService.createNoteLink(note.noteId, {referenceLink: true}))).then(links => {
|
||||
Promise.all(notes.map(note => linkService.createLink(note.noteId, {referenceLink: true}))).then(links => {
|
||||
const $list = $("<ul>").append(...links.map($link => $("<li>").append($link)));
|
||||
|
||||
data.dataTransfer.setData("text/html", $list[0].outerHTML);
|
||||
|
||||
Reference in New Issue
Block a user