mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
note content refactoring, WIP
This commit is contained in:
@@ -74,6 +74,13 @@ class Note extends Entity {
|
||||
return noteContent.content;
|
||||
}
|
||||
|
||||
/** @returns {Promise<*>} */
|
||||
async getJsonContent() {
|
||||
const content = await this.getContent();
|
||||
|
||||
return JSON.parse(content);
|
||||
}
|
||||
|
||||
/** @returns {boolean} true if this note is the root of the note tree. Root note has "root" noteId */
|
||||
isRoot() {
|
||||
return this.noteId === 'root';
|
||||
|
||||
Reference in New Issue
Block a user