mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 18:50:41 +01:00
added links to the import/export + fixing internal links inside note content
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
const sax = require("sax");
|
||||
const stream = require('stream');
|
||||
const xml2js = require('xml2js');
|
||||
const log = require("./log");
|
||||
const utils = require("./utils");
|
||||
const noteService = require("./notes");
|
||||
const imageService = require("./image");
|
||||
const log = require("../log");
|
||||
const utils = require("../utils");
|
||||
const noteService = require("../notes");
|
||||
const imageService = require("../image");
|
||||
|
||||
// date format is e.g. 20181121T193703Z
|
||||
function parseDate(text) {
|
||||
@@ -69,6 +69,7 @@ async function createNewNote(parentNoteId, noteData) {
|
||||
noteData.mime = noteData.mime || parentNote.mime;
|
||||
|
||||
const note = await new Note({
|
||||
noteId: noteData.noteId, // optionally can force specific noteId
|
||||
title: noteData.title,
|
||||
content: noteData.content,
|
||||
isProtected: noteData.isProtected,
|
||||
@@ -116,6 +117,7 @@ async function createNote(parentNoteId, title, content = "", extraOptions = {})
|
||||
title: title,
|
||||
content: extraOptions.json ? JSON.stringify(content, null, '\t') : content,
|
||||
target: 'into',
|
||||
noteId: extraOptions.noteId,
|
||||
isProtected: !!extraOptions.isProtected,
|
||||
type: extraOptions.type,
|
||||
mime: extraOptions.mime,
|
||||
|
||||
Reference in New Issue
Block a user