mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 01:06:36 +01:00
export stores note position and some other fixes
This commit is contained in:
@@ -49,7 +49,14 @@ async function triggerNoteTitleChanged(note) {
|
||||
* FIXME: noteData has mandatory property "target", it might be better to add it as parameter to reflect this
|
||||
*/
|
||||
async function createNewNote(parentNoteId, noteData) {
|
||||
const newNotePos = await getNewNotePosition(parentNoteId, noteData);
|
||||
let newNotePos;
|
||||
|
||||
if (noteData.notePosition !== undefined) {
|
||||
newNotePos = noteData.notePosition;
|
||||
}
|
||||
else {
|
||||
newNotePos = await getNewNotePosition(parentNoteId, noteData);
|
||||
}
|
||||
|
||||
const parentNote = await repository.getNote(parentNoteId);
|
||||
|
||||
@@ -130,7 +137,8 @@ async function createNote(parentNoteId, title, content = "", extraOptions = {})
|
||||
type: extraOptions.type,
|
||||
mime: extraOptions.mime,
|
||||
dateCreated: extraOptions.dateCreated,
|
||||
isExpanded: extraOptions.isExpanded
|
||||
isExpanded: extraOptions.isExpanded,
|
||||
notePosition: extraOptions.notePosition
|
||||
};
|
||||
|
||||
if (extraOptions.json && !noteData.type) {
|
||||
|
||||
Reference in New Issue
Block a user