Skip to content

Setting attribute in note creation method & activating note in new tab #1645

Answered by zadam
MorganeLeCaignec asked this question in Q&A
Discussion options

You must be logged in to vote

So far i'm creating the note and immediately doing .setRelation and .setLabel on it, but I was wondering.

Yes, that's the recommended approach. Trying to combine everything in one call just added unnecessary complexity.

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) ?

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)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MorganeLeCaignec
Comment options

Answer selected by MorganeLeCaignec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants