mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
note type context submenu now works end to end
This commit is contained in:
@@ -81,10 +81,6 @@ async function createNewNote(parentNoteId, noteData) {
|
||||
noteData.type = noteData.type || parentNote.type;
|
||||
noteData.mime = noteData.mime || parentNote.mime;
|
||||
|
||||
if (noteData.type === 'text' || noteData.type === 'code') {
|
||||
noteData.content = noteData.content || "";
|
||||
}
|
||||
|
||||
const note = await new Note({
|
||||
noteId: noteData.noteId, // optionally can force specific noteId
|
||||
title: noteData.title,
|
||||
@@ -93,6 +89,10 @@ async function createNewNote(parentNoteId, noteData) {
|
||||
mime: noteData.mime || 'text/html'
|
||||
}).save();
|
||||
|
||||
if (note.isStringNote()) {
|
||||
noteData.content = noteData.content || "";
|
||||
}
|
||||
|
||||
note.noteContent = await new NoteContent({
|
||||
noteId: note.noteId,
|
||||
content: noteData.content
|
||||
|
||||
Reference in New Issue
Block a user