Setting attribute in note creation method & activating note in new tab #1645
-
Is there a way to directly set attributes of a note through createNewNote() or createTextNote() ? So far i'm creating the note and immediately doing .setRelation and .setLabel on it, but I was wondering. Sort-of related question : Is there was from the frontend API to open a new Tab, or even better, a way to activate a note by opening a new tab (an optional parameter of activateNewNote() to essentially do a CTRL+click, opening and activating a new tab without changing the currently active one) ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, that's the recommended approach. Trying to combine everything in one call just added unnecessary complexity.
I just added a new API method for that - search for "openTabWithNote" in https://zadam.github.io/trilium/frontend_api/FrontendScriptApi.html (will be in next 0.46 beta) |
Beta Was this translation helpful? Give feedback.
Yes, that's the recommended approach. Trying to combine everything in one call just added unnecessary complexity.
I just added a new API method for that - search for "openTabWithNote" in https://zadam.github.io/trilium/frontend_api/FrontendScriptApi.html (will be in next 0.46 beta)