detect existing attachment in target note

This commit is contained in:
zadam
2023-05-29 22:37:19 +02:00
parent df17840dbc
commit 235b779dec
22 changed files with 80 additions and 52 deletions

View File

@@ -27,7 +27,7 @@ async function createNote(parentNotePath, options = {}) {
[options.title, options.content] = parseSelectedHtml(options.textEditor.getSelectedHtml());
}
const parentNoteId = treeService.getNoteIdFromNotePath(parentNotePath);
const parentNoteId = treeService.getNoteIdFromUrl(parentNotePath);
if (options.type === 'mermaid' && !options.content) {
options.content = `graph TD;
@@ -110,7 +110,7 @@ function parseSelectedHtml(selectedHtml) {
}
async function duplicateSubtree(noteId, parentNotePath) {
const parentNoteId = treeService.getNoteIdFromNotePath(parentNotePath);
const parentNoteId = treeService.getNoteIdFromUrl(parentNotePath);
const {note} = await server.post(`notes/${noteId}/duplicate/${parentNoteId}`);
await ws.waitForMaxKnownEntityChangeId();