mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
basic saving of attributes in the widget
This commit is contained in:
@@ -541,13 +541,14 @@ class Note extends Entity {
|
||||
/**
|
||||
* @return {Promise<Attribute>}
|
||||
*/
|
||||
async addAttribute(type, name, value = "", isInheritable = false) {
|
||||
async addAttribute(type, name, value = "", isInheritable = false, position = 1000) {
|
||||
const attr = new Attribute({
|
||||
noteId: this.noteId,
|
||||
type: type,
|
||||
name: name,
|
||||
value: value,
|
||||
isInheritable: isInheritable
|
||||
isInheritable: isInheritable,
|
||||
position: position
|
||||
});
|
||||
|
||||
await attr.save();
|
||||
|
||||
Reference in New Issue
Block a user