- Mark the entity as (soft) deleted. It will be completely erased later.
-
-This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
@@ -1174,7 +1172,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
diff --git a/docs/backend_api/BAttachment.html b/docs/backend_api/BAttachment.html
new file mode 100644
index 000000000..1ab7b403f
--- /dev/null
+++ b/docs/backend_api/BAttachment.html
@@ -0,0 +1,2873 @@
+
+
+
+
+ JSDoc: Class: BAttachment
+
+
+
+
+
+
+
+
+
+
+
+
+
Class: BAttachment
+
+
+
+
+
+
+
+
+
+
+
BAttachment()
+
+
Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
larger amounts of data and generally not accessible to the user.
+ true if the note has string content (not binary)
+
+
+
+
+
+
+ Type
+
+
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
markAsDeleted(deleteIdopt)
+
+
+
+
+
+
+
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/backend_api/BAttribute.html b/docs/backend_api/BAttribute.html
index cc20d0db8..cc67f7642 100644
--- a/docs/backend_api/BAttribute.html
+++ b/docs/backend_api/BAttribute.html
@@ -30,8 +30,7 @@
BAttribute()
-
Attribute is an abstract concept which has two real uses - label (key - value pair)
-and relation (representing named relationship between source and target note)
+
Attribute is an abstract concept which has two real uses - label (key - value pair)
and relation (representing named relationship between source and target note)
@@ -94,7 +93,7 @@ and relation (representing named relationship between source and target note)Source:
@@ -1736,9 +1735,7 @@ and relation (representing named relationship between source and target note)
- Mark the entity as (soft) deleted. It will be completely erased later.
-
-This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
@@ -2097,7 +2094,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
diff --git a/docs/backend_api/BBranch.html b/docs/backend_api/BBranch.html
index 4e716ec2e..b1ad91429 100644
--- a/docs/backend_api/BBranch.html
+++ b/docs/backend_api/BBranch.html
@@ -30,11 +30,7 @@
BBranch()
-
Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
-parents.
-
-Note that you should not rely on the branch's identity, since it can change easily with a note's move.
-Always check noteId instead.
+
Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
parents.
Note that you should not rely on the branch's identity, since it can change easily with a note's move.
Always check noteId instead.
@@ -421,11 +417,7 @@ Always check noteId instead.
- Branch is weak when its existence should not hinder deletion of its note.
-As a result, note with only weak branches should be immediately deleted.
-An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
-not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
-of deletion should not act as a clone.
+ Branch is weak when its existence should not hinder deletion of its note.
As a result, note with only weak branches should be immediately deleted.
An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
of deletion should not act as a clone.
@@ -549,7 +541,7 @@ of deletion should not act as a clone.
-
@@ -1850,9 +1842,7 @@ of deletion should not act as a clone.
- Mark the entity as (soft) deleted. It will be completely erased later.
-
-This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
@@ -2211,7 +2201,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
diff --git a/docs/backend_api/BEtapiToken.html b/docs/backend_api/BEtapiToken.html
index 6fce5b28a..4fc677120 100644
--- a/docs/backend_api/BEtapiToken.html
+++ b/docs/backend_api/BEtapiToken.html
@@ -30,13 +30,7 @@
BEtapiToken()
-
EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
-Used by:
-- Trilium Sender
-- ETAPI clients
-
-The format user is presented with is "_". This is also called "authToken" to distinguish it
-from tokenHash and token.
+
EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
Used by:
- Trilium Sender
- ETAPI clients
The format user is presented with is "_". This is also called "authToken" to distinguish it
from tokenHash and token.
@@ -1293,9 +1287,7 @@ from tokenHash and token.
- Mark the entity as (soft) deleted. It will be completely erased later.
-
-This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
@@ -1654,7 +1646,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
diff --git a/docs/backend_api/BNote.html b/docs/backend_api/BNote.html
index 6c07103c9..e7eef679a 100644
--- a/docs/backend_api/BNote.html
+++ b/docs/backend_api/BNote.html
@@ -93,7 +93,7 @@
- - set during the deletion operation, before it is completed (removed from becca completely)
+ set during the deletion operation, before it is completed (removed from becca completely)
- Adds a new attribute to this note. The attribute is saved and returned.
-See addLabel, addRelation for more specific methods.
+ Adds a new attribute to this note. The attribute is saved and returned.
See addLabel, addRelation for more specific methods.
@@ -1518,7 +1517,7 @@ See addLabel, addRelation for more specific methods.
-int
+int
|
null
@@ -1588,7 +1587,7 @@ See addLabel, addRelation for more specific methods.
@@ -1897,8 +1896,7 @@ See addLabel, addRelation for more specific methods.
- Adds a new relation to this note. The relation attribute is saved and
-returned.
+ Adds a new relation to this note. The relation attribute is saved and
returned.
- Some notes are eligible for conversion into an attachment of its parent, note must have these properties:
-- it has exactly one target relation
-- it has a relation from its parent note
-- it has no children
-- it has no clones
-- the parent is of type text
-- both notes are either unprotected or user is in protected session
-
-Currently, works only for image notes.
-
-In the future, this functionality might get more generic and some of the requirements relaxed.
+ Some notes are eligible for conversion into an attachment of its parent, note must have these properties:
- it has exactly one target relation
- it has a relation from its parent note
- it has no children
- it has no clones
- the parent is of type text
- both notes are either unprotected or user is in protected session
Currently, works only for image notes.
In the future, this functionality might get more generic and some of the requirements relaxed.
@@ -2432,7 +2420,7 @@ In the future, this functionality might get more generic and some of the require
@@ -3639,8 +3627,7 @@ In the future, this functionality might get more generic and some of the require
- attribute of the given type and name. If there are more such attributes, first is returned.
- Returns null if there's no such attribute belonging to this note.
+ attribute of the given type and name. If there are more such attributes, first is returned.
Returns null if there's no such attribute belonging to this note.
@@ -3789,7 +3776,7 @@ In the future, this functionality might get more generic and some of the require
@@ -3858,8 +3845,7 @@ In the future, this functionality might get more generic and some of the require
- Beware that the method must not create a copy of the array, but actually returns its internal array
-(for performance reasons)
+ Beware that the method must not create a copy of the array, but actually returns its internal array
(for performance reasons)
@@ -3997,7 +3983,7 @@ In the future, this functionality might get more generic and some of the require
@@ -5203,8 +5187,7 @@ In the future, this functionality might get more generic and some of the require
- - returns only notes which are templated, does not include their subtrees
- in effect returns notes which are influenced by note's non-inheritable attributes
+ - returns only notes which are templated, does not include their subtrees
in effect returns notes which are influenced by note's non-inheritable attributes
@@ -5281,7 +5264,7 @@ In the future, this functionality might get more generic and some of the require
@@ -6062,9 +6045,7 @@ In the future, this functionality might get more generic and some of the require
- attribute belonging to this specific note (excludes inherited attributes)
-
-This method can be significantly faster than the getAttribute()
+ attribute belonging to this specific note (excludes inherited attributes)
This method can be significantly faster than the getAttribute()
@@ -6213,7 +6194,7 @@ This method can be significantly faster than the getAttribute()
@@ -6282,8 +6263,7 @@ This method can be significantly faster than the getAttribute()
- Beware that the method must not create a copy of the array, but actually returns its internal array
-(for performance reasons)
+ Beware that the method must not create a copy of the array, but actually returns its internal array
(for performance reasons)
@@ -6483,7 +6463,7 @@ This method can be significantly faster than the getAttribute()
@@ -12121,9 +12101,7 @@ This method can be significantly faster than the getAttribute()
- Mark the entity as (soft) deleted. It will be completely erased later.
-
-This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
@@ -12536,7 +12514,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
@@ -14754,7 +14732,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
diff --git a/docs/backend_api/BOption.html b/docs/backend_api/BOption.html
index 11696ebaf..5c7ef66ae 100644
--- a/docs/backend_api/BOption.html
+++ b/docs/backend_api/BOption.html
@@ -1151,9 +1151,7 @@
- Mark the entity as (soft) deleted. It will be completely erased later.
-
-This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
@@ -1512,7 +1510,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
diff --git a/docs/backend_api/BRecentNote.html b/docs/backend_api/BRecentNote.html
index d339e4657..ff83f10a1 100644
--- a/docs/backend_api/BRecentNote.html
+++ b/docs/backend_api/BRecentNote.html
@@ -1083,9 +1083,7 @@
- Mark the entity as (soft) deleted. It will be completely erased later.
-
-This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
@@ -1444,7 +1442,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
diff --git a/docs/backend_api/BRevision.html b/docs/backend_api/BRevision.html
new file mode 100644
index 000000000..d34781be5
--- /dev/null
+++ b/docs/backend_api/BRevision.html
@@ -0,0 +1,2690 @@
+
+
+
+
+ JSDoc: Class: BRevision
+
+
+
+
+
+
+
+
+
+
+
+
+
Class: BRevision
+
+
+
+
+
+
+
+
+
+
+
BRevision()
+
+
Revision represents a snapshot of note's title and content at some point in the past.
It's used for seamless note versioning.
+ true if the note has string content (not binary)
+
+
+
+
+
+
+ Type
+
+
+
+boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
markAsDeleted(deleteIdopt)
+
+
+
+
+
+
+
+ Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/backend_api/BackendScriptApi.html b/docs/backend_api/BackendScriptApi.html
index b5c348b05..fb7f79735 100644
--- a/docs/backend_api/BackendScriptApi.html
+++ b/docs/backend_api/BackendScriptApi.html
@@ -49,8 +49,7 @@
-
This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
-available in the JS backend notes. You can use e.g. api.log(api.startNote.title);
+
This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
available in the JS backend notes. You can use e.g. api.log(api.startNote.title);
@@ -94,7 +93,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
@@ -1048,8 +781,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
- Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and
-JSON MIME type. See also createNewNote() for more options.
+ Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and
JSON MIME type. See also createNewNote() for more options.
@@ -1188,7 +920,7 @@ JSON MIME type. See also createNewNote() for more options.
@@ -1246,7 +978,7 @@ JSON MIME type. See also createNewNote() for more options.
-
createNewNote() → {Object}
+
createNewNote(params) → {Object}
@@ -1261,15 +993,10 @@ JSON MIME type. See also createNewNote() for more options.
-
-
-
-
-
Properties:
-
+
Parameters:
-
+
@@ -1309,8 +1036,9 @@ JSON MIME type. See also createNewNote() for more options.
Properties
+
-
+
@@ -1353,6 +1081,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1386,6 +1116,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1411,7 +1143,7 @@ JSON MIME type. See also createNewNote() for more options.
string
|
-buffer
+Buffer
@@ -1422,6 +1154,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1444,7 +1178,7 @@ JSON MIME type. See also createNewNote() for more options.
-string
+NoteType
@@ -1455,6 +1189,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1490,6 +1226,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1525,6 +1263,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1562,6 +1302,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1599,6 +1341,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1623,7 +1367,7 @@ JSON MIME type. See also createNewNote() for more options.
-int
+int
@@ -1636,6 +1380,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1662,6 +1408,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -1691,7 +1439,7 @@ JSON MIME type. See also createNewNote() for more options.
@@ -1934,23 +1682,11 @@ JSON MIME type. See also createNewNote() for more options.
-
-
+
+
Properties
+
-
-
-
-
-
-
-
-
-
-
Properties:
-
-
-
-
+
@@ -1976,7 +1712,7 @@ JSON MIME type. See also createNewNote() for more options.
-
extraOptions.json
+
json
@@ -1995,6 +1731,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2013,7 +1751,7 @@ JSON MIME type. See also createNewNote() for more options.
-
extraOptions.isProtected
+
isProtected
@@ -2032,6 +1770,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2050,7 +1790,7 @@ JSON MIME type. See also createNewNote() for more options.
-
extraOptions.type
+
type
@@ -2069,6 +1809,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2087,7 +1829,7 @@ JSON MIME type. See also createNewNote() for more options.
-
extraOptions.mime
+
mime
@@ -2106,6 +1848,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2124,7 +1868,7 @@ JSON MIME type. See also createNewNote() for more options.
-
extraOptions.attributes
+
attributes
@@ -2143,6 +1887,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2156,8 +1902,9 @@ JSON MIME type. See also createNewNote() for more options.
attributes to be created for this note
Properties
+
-
+
@@ -2187,7 +1934,7 @@ JSON MIME type. See also createNewNote() for more options.
-string
+AttributeType
@@ -2198,6 +1945,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2227,6 +1976,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2258,6 +2009,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2277,6 +2030,15 @@ JSON MIME type. See also createNewNote() for more options.
+
+
+
+
+
+
+
+
+
@@ -2311,7 +2073,7 @@ JSON MIME type. See also createNewNote() for more options.
@@ -2429,23 +2191,11 @@ JSON MIME type. See also createNewNote() for more options.
-
-
+
+
Properties
+
-
-
-
-
-
-
-
-
-
-
Properties:
-
-
-
-
+
@@ -2471,7 +2221,7 @@ JSON MIME type. See also createNewNote() for more options.
-
opts.id
+
id
@@ -2488,6 +2238,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2504,13 +2256,19 @@ JSON MIME type. See also createNewNote() for more options.
-
opts.type
+
type
-string
+"note"
+|
+
+"script"
+|
+
+"customWidget"
@@ -2521,6 +2279,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2530,17 +2290,14 @@ JSON MIME type. See also createNewNote() for more options.
-
one of
- * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)
- * "script" - activating the launcher will execute the script (specified in scriptNoteId param)
- * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)
+
one of
* "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)
* "script" - activating the launcher will execute the script (specified in scriptNoteId param)
* "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)
-
opts.title
+
title
@@ -2557,6 +2314,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2573,7 +2332,7 @@ JSON MIME type. See also createNewNote() for more options.
-
opts.isVisible
+
isVisible
@@ -2592,6 +2351,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2610,7 +2371,7 @@ JSON MIME type. See also createNewNote() for more options.
-
opts.icon
+
icon
@@ -2629,6 +2390,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2645,7 +2408,7 @@ JSON MIME type. See also createNewNote() for more options.
-
opts.keyboardShortcut
+
keyboardShortcut
@@ -2664,6 +2427,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2680,7 +2445,7 @@ JSON MIME type. See also createNewNote() for more options.
-
opts.targetNoteId
+
targetNoteId
@@ -2699,6 +2464,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2715,7 +2482,7 @@ JSON MIME type. See also createNewNote() for more options.
-
opts.scriptNoteId
+
scriptNoteId
@@ -2734,6 +2501,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2750,7 +2519,7 @@ JSON MIME type. See also createNewNote() for more options.
-
opts.widgetNoteId
+
widgetNoteId
@@ -2769,6 +2538,8 @@ JSON MIME type. See also createNewNote() for more options.
+
+
@@ -2785,6 +2556,15 @@ JSON MIME type. See also createNewNote() for more options.
+
+
+
+
+
+
+
+
+
@@ -2817,7 +2597,7 @@ JSON MIME type. See also createNewNote() for more options.
@@ -4433,8 +4213,7 @@ JSON MIME type. See also createNewNote() for more options.
- Instance name identifies particular Trilium instance. It can be useful for scripts
-if some action needs to happen on only one specific instance.
+ Instance name identifies particular Trilium instance. It can be useful for scripts
if some action needs to happen on only one specific instance.
@@ -4478,7 +4257,7 @@ if some action needs to happen on only one specific instance.
@@ -6389,8 +6168,7 @@ if some action needs to happen on only one specific instance.
- This is a powerful search method - you can search by attributes and their values, e.g.:
-"#dateModified =* MONTH AND #log". See https://github.com/zadam/trilium/wiki/Search for full documentation for all options
+ This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See https://github.com/zadam/trilium/wiki/Search for full documentation for all options
@@ -6526,7 +6304,7 @@ if some action needs to happen on only one specific instance.
@@ -6591,8 +6369,7 @@ if some action needs to happen on only one specific instance.
- This is a powerful search method - you can search by attributes and their values, e.g.:
-"#dateModified =* MONTH AND #log". See https://github.com/zadam/trilium/wiki/Search for full documentation for all options
+ This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See https://github.com/zadam/trilium/wiki/Search for full documentation for all options
@@ -6728,7 +6505,7 @@ if some action needs to happen on only one specific instance.
@@ -6790,10 +6567,7 @@ if some action needs to happen on only one specific instance.
- This method finds note by its noteId and prefix and either sets it to the given parentNoteId
-or removes the branch (if parentNoteId is not given).
-
-This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix.
+ This method finds note by its noteId and prefix and either sets it to the given parentNoteId
or removes the branch (if parentNoteId is not given).
This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix.
@@ -6937,7 +6711,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look
@@ -7558,7 +7334,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look
-
transactional(func) → {?}
+
transactional(func) → {any}
@@ -7566,8 +7342,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look
- This functions wraps code which is supposed to be running in transaction. If transaction already
-exists, then we'll use that transaction.
+ This functions wraps code which is supposed to be running in transaction. If transaction already
exists, then we'll use that transaction.
@@ -7660,7 +7435,7 @@ exists, then we'll use that transaction.
+ There are many different Note types, some of which are entirely opaque to the
end user. Those types should be used only for checking against, they are
not for direct use.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/frontend_api/FAttribute.html b/docs/frontend_api/FAttribute.html
index 7d05e5b0a..4ef3ae3ee 100644
--- a/docs/frontend_api/FAttribute.html
+++ b/docs/frontend_api/FAttribute.html
@@ -30,8 +30,7 @@
FAttribute()
-
Attribute is an abstract concept which has two real uses - label (key - value pair)
-and relation (representing named relationship between source and target note)
+
Attribute is an abstract concept which has two real uses - label (key - value pair)
and relation (representing named relationship between source and target note)
@@ -94,7 +93,7 @@ and relation (representing named relationship between source and target note)Source:
This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object
-available in the JS frontend notes. You can use e.g. api.showMessage(api.startNote.title);
+
This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object
available in the JS frontend notes. You can use e.g. api.showMessage(api.startNote.title);
@@ -94,7 +93,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
@@ -1455,23 +1157,11 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
-
-
+
+
Properties
+
-
-
-
-
-
-
-
-
-
-
Properties:
-
-
-
-
+
@@ -1495,7 +1185,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
-
opts.id
+
title
@@ -1510,38 +1200,8 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
- <optional>
-
-
-
-
-
-
-
id of the button, used to identify the old instances of this button to be replaced
- ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.
-
-
-
-
-
-
-
opts.title
-
-
-
-
-
-string
-
-
-
-
-
-
-
-
@@ -1556,38 +1216,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
-
opts.icon
-
-
-
-
-
-string
-
-
-
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
name of the boxicon to be used (e.g. "time" for "bx-time" icon)
-
-
-
-
-
-
-
opts.action
+
action
@@ -1604,6 +1233,8 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
+
+
@@ -1616,7 +1247,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
-
opts.shortcut
+
id
@@ -1635,6 +1266,74 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
+
+
+
+
+
+
+
+
id of the button, used to identify the old instances of this button to be replaced
ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.
+
+
+
+
+
+
+
icon
+
+
+
+
+
+string
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
name of the boxicon to be used (e.g. "time" for "bx-time" icon)
+
+
+
+
+
+
+
shortcut
+
+
+
+
+
+string
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
@@ -1647,6 +1346,15 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
+
+
+
+
+
+
+
+
+
@@ -1667,8 +1375,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
-
Deprecated:
you can now create/modify launchers in the top-left Menu -> Configure Launchbar
- for special needs there's also backend API's createOrUpdateLauncher()
+
Deprecated:
you can now create/modify launchers in the top-left Menu -> Configure Launchbar
for special needs there's also backend API's createOrUpdateLauncher()
@@ -1682,7 +1389,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
@@ -1985,8 +1692,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
-
specify namespace of the handler for the cases where call for bind may be repeated.
- If a handler with this ID exists, it's replaced by the new handler.
+
specify namespace of the handler for the cases where call for bind may be repeated.
If a handler with this ID exists, it's replaced by the new handler.
@@ -2027,7 +1733,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
@@ -3352,8 +3058,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
- Get access to the widget handling note detail. Methods like `getWidgetType()` and `getTypeWidget()` to get to the
-implementation of actual widget type.
+ Get access to the widget handling note detail. Methods like `getWidgetType()` and `getTypeWidget()` to get to the
implementation of actual widget type.
@@ -3397,7 +3102,7 @@ implementation of actual widget type.
@@ -3769,8 +3474,7 @@ implementation of actual widget type.
- Instance name identifies particular Trilium instance. It can be useful for scripts
-if some action needs to happen on only one specific instance.
+ Instance name identifies particular Trilium instance. It can be useful for scripts
if some action needs to happen on only one specific instance.
@@ -3814,7 +3518,7 @@ if some action needs to happen on only one specific instance.
@@ -4031,8 +3735,7 @@ if some action needs to happen on only one specific instance.
- Returns note by given noteId. If note is missing from the cache, it's loaded.
-*
+ Returns note by given noteId. If note is missing from the cache, it's loaded.
*
@@ -4125,7 +3828,7 @@ if some action needs to happen on only one specific instance.
@@ -4187,10 +3890,7 @@ if some action needs to happen on only one specific instance.
- Returns list of notes. If note is missing from the cache, it's loaded.
-
-This is often used to bulk-fill the cache with notes which would have to be picked one by one
-otherwise (by e.g. createLink())
+ Returns list of notes. If note is missing from the cache, it's loaded.
This is often used to bulk-fill the cache with notes which would have to be picked one by one
otherwise (by e.g. createLink())
@@ -4326,7 +4026,7 @@ otherwise (by e.g. createLink())
@@ -6251,7 +5951,7 @@ otherwise (by e.g. createLink())
-
runOnBackend(script, params) → {Promise.<*>}
+
runOnBackend(script, params) → {Promise.<any>}
@@ -6259,8 +5959,7 @@ otherwise (by e.g. createLink())
- Executes given anonymous function on the backend.
-Internally this serializes the anonymous function into string and sends it to backend via AJAX.
+ Executes given anonymous function on the backend.
Internally this serializes the anonymous function into string and sends it to backend via AJAX.
@@ -6303,6 +6002,9 @@ Internally this serializes the anonymous function into string and sends it to ba
string
+|
+
+function
@@ -6325,7 +6027,7 @@ Internally this serializes the anonymous function into string and sends it to ba
-Array.<?>
+Array.<any>
@@ -6376,7 +6078,7 @@ Internally this serializes the anonymous function into string and sends it to ba
@@ -6416,7 +6118,7 @@ Internally this serializes the anonymous function into string and sends it to ba
-Promise.<*>
+Promise.<any>
@@ -6442,8 +6144,7 @@ Internally this serializes the anonymous function into string and sends it to ba
- This is a powerful search method - you can search by attributes and their values, e.g.:
-"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
+ This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
@@ -6536,7 +6237,7 @@ Internally this serializes the anonymous function into string and sends it to ba
@@ -6598,8 +6299,7 @@ Internally this serializes the anonymous function into string and sends it to ba
- This is a powerful search method - you can search by attributes and their values, e.g.:
-"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
+ This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
@@ -6692,7 +6392,7 @@ Internally this serializes the anonymous function into string and sends it to ba
@@ -7654,11 +7354,7 @@ Internally this serializes the anonymous function into string and sends it to ba
- Trilium runs in a backend and frontend process, when something is changed on the backend from a script,
-frontend will get asynchronously synchronized.
-
-This method returns a promise which resolves once all the backend -> frontend synchronization is finished.
-Typical use case is when a new note has been created, we should wait until it is synced into frontend and only then activate it.
+ Trilium runs in a backend and frontend process, when something is changed on the backend from a script,
frontend will get asynchronously synchronized.
This method returns a promise which resolves once all the backend -> frontend synchronization is finished.
Typical use case is when a new note has been created, we should wait until it is synced into frontend and only then activate it.
@@ -7702,7 +7398,7 @@ Typical use case is when a new note has been created, we should wait until it is
@@ -7766,7 +7462,7 @@ Typical use case is when a new note has been created, we should wait until it is
diff --git a/docs/frontend_api/NoteContextAwareWidget.html b/docs/frontend_api/NoteContextAwareWidget.html
new file mode 100644
index 000000000..32692483d
--- /dev/null
+++ b/docs/frontend_api/NoteContextAwareWidget.html
@@ -0,0 +1,1029 @@
+
+
+
+
+ JSDoc: Class: NoteContextAwareWidget
+
+
+
+
+
+
+
+
+
+
+
+
+
Class: NoteContextAwareWidget
+
+
+
+
+
+
+
+
+
+
+
NoteContextAwareWidget()
+
+
This widget allows for changing and updating depending on the active note.
import promotedAttributeDefinitionParser from '../services/promoted_attribute_definition_parser.js';
+/**
+ * There are currently only two types of attributes, labels or relations.
+ * @typedef {"label" | "relation"} AttributeType
+ */
+
/**
* Attribute is an abstract concept which has two real uses - label (key - value pair)
* and relation (representing named relationship between source and target note)
@@ -45,7 +50,7 @@ class FAttribute {
this.attributeId = row.attributeId;
/** @type {string} */
this.noteId = row.noteId;
- /** @type {string} */
+ /** @type {AttributeType} */
this.type = row.type;
/** @type {string} */
this.name = row.name;
@@ -116,7 +121,7 @@ export default FAttribute;
diff --git a/docs/frontend_api/entities_fblob.js.html b/docs/frontend_api/entities_fblob.js.html
new file mode 100644
index 000000000..811119774
--- /dev/null
+++ b/docs/frontend_api/entities_fblob.js.html
@@ -0,0 +1,69 @@
+
+
+
+
+ JSDoc: Source: entities/fblob.js
+
+
+
+
+
+
+
+
+
+
+
+
+
Source: entities/fblob.js
+
+
+
+
+
+
+
+
+
export default class FBlob {
+ constructor(row) {
+ /** @type {string} */
+ this.blobId = row.blobId;
+
+ /**
+ * can either contain the whole content (in e.g. string notes), only part (large text notes) or nothing at all (binary notes, images)
+ * @type {string}
+ */
+ this.content = row.content;
+ this.contentLength = row.contentLength;
+
+ /** @type {string} */
+ this.dateModified = row.dateModified;
+ /** @type {string} */
+ this.utcDateModified = row.utcDateModified;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/frontend_api/entities_fbranch.js.html b/docs/frontend_api/entities_fbranch.js.html
index 1d663d7de..95ef4d084 100644
--- a/docs/frontend_api/entities_fbranch.js.html
+++ b/docs/frontend_api/entities_fbranch.js.html
@@ -100,7 +100,7 @@ export default FBranch;
diff --git a/docs/frontend_api/entities_fnote.js.html b/docs/frontend_api/entities_fnote.js.html
index 99231fa38..5fefcb779 100644
--- a/docs/frontend_api/entities_fnote.js.html
+++ b/docs/frontend_api/entities_fnote.js.html
@@ -53,6 +53,25 @@ const NOTE_TYPE_ICONS = {
"contentWidget": "bx bxs-widget"
};
+/**
+ * There are many different Note types, some of which are entirely opaque to the
+ * end user. Those types should be used only for checking against, they are
+ * not for direct use.
+ * @typedef {"file" | "image" | "search" | "noteMap" | "launcher" | "doc" | "contentWidget" | "text" | "relationMap" | "render" | "canvas" | "mermaid" | "book" | "webView" | "code"} NoteType
+ */
+
+/**
+ * @typedef {Object} NotePathRecord
+ * @property {boolean} isArchived
+ * @property {boolean} isInHoistedSubTree
+ * @property {boolean} isSearch
+ * @property {Array<string>} notePath
+ * @property {boolean} isHidden
+ */
+
+/**
+ * Note is the main node and concept in Trilium.
+ */
class FNote {
/**
* @param {Froca} froca
@@ -93,8 +112,8 @@ class FNote {
/** @type {boolean} */
this.isProtected = !!row.isProtected;
/**
- * one of 'text', 'code', 'file' or 'render'
- * @type {string}
+ * See {@see NoteType} for info on values.
+ * @type {NoteType}
*/
this.type = row.type;
/**
@@ -399,7 +418,7 @@ class FNote {
/**
* @param {string} [hoistedNoteId='root']
- * @return {Array<{isArchived: boolean, isInHoistedSubTree: boolean, isSearch: boolean, notePath: Array<string>, isHidden: boolean}>}
+ * @return {Array<NotePathRecord>}
*/
getSortedNotePathRecords(hoistedNoteId = 'root') {
const isHoistedRoot = hoistedNoteId === 'root';
@@ -478,7 +497,7 @@ class FNote {
/**
* @param {FAttribute[]} attributes
- * @param {string} type
+ * @param {AttributeType} type
* @param {string} name
* @return {FAttribute[]}
* @private
@@ -607,7 +626,7 @@ class FNote {
}
/**
- * @param {string} type - attribute type (label, relation, etc.)
+ * @param {AttributeType} type - attribute type (label, relation, etc.)
* @param {string} name - attribute name
* @returns {boolean} true if note has an attribute with given type and name (including inherited)
*/
@@ -618,7 +637,7 @@ class FNote {
}
/**
- * @param {string} type - attribute type (label, relation, etc.)
+ * @param {AttributeType} type - attribute type (label, relation, etc.)
* @param {string} name - attribute name
* @returns {boolean} true if note has an attribute with given type and name (including inherited)
*/
@@ -627,7 +646,7 @@ class FNote {
}
/**
- * @param {string} type - attribute type (label, relation, etc.)
+ * @param {AttributeType} type - attribute type (label, relation, etc.)
* @param {string} name - attribute name
* @returns {FAttribute} attribute of the given type and name. If there are more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.
*/
@@ -638,7 +657,7 @@ class FNote {
}
/**
- * @param {string} type - attribute type (label, relation, etc.)
+ * @param {AttributeType} type - attribute type (label, relation, etc.)
* @param {string} name - attribute name
* @returns {FAttribute} attribute of the given type and name. If there are more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.
*/
@@ -649,7 +668,7 @@ class FNote {
}
/**
- * @param {string} type - attribute type (label, relation, etc.)
+ * @param {AttributeType} type - attribute type (label, relation, etc.)
* @param {string} name - attribute name
* @returns {string} attribute value of the given type and name or null if no such attribute exists.
*/
@@ -660,7 +679,7 @@ class FNote {
}
/**
- * @param {string} type - attribute type (label, relation, etc.)
+ * @param {AttributeType} type - attribute type (label, relation, etc.)
* @param {string} name - attribute name
* @returns {string} attribute value of the given type and name or null if no such attribute exists.
*/
@@ -1012,7 +1031,7 @@ export default FNote;
diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.html
new file mode 100644
index 000000000..6d15487aa
--- /dev/null
+++ b/docs/frontend_api/global.html
@@ -0,0 +1,678 @@
+
+
+
+
+ JSDoc: Global
+
+
+
+
+
+
+
+
+
+
+
+ There are many different Note types, some of which are entirely opaque to the
end user. Those types should be used only for checking against, they are
not for direct use.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.html
index 46ccdc9a8..1c6319630 100644
--- a/docs/frontend_api/index.html
+++ b/docs/frontend_api/index.html
@@ -50,7 +50,7 @@
diff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.html
index 3540460c6..7780bc7a5 100644
--- a/docs/frontend_api/services_frontend_script_api.js.html
+++ b/docs/frontend_api/services_frontend_script_api.js.html
@@ -43,6 +43,18 @@ import BasicWidget from "../widgets/basic_widget.js";
import SpacedUpdate from "./spaced_update.js";
import shortcutService from "./shortcuts.js";
+
+/**
+ * A whole number
+ * @typedef {number} int
+ */
+
+/**
+ * An instance of the frontend api available globally.
+ * @global
+ * @var {FrontendScriptApi} api
+ */
+
/**
* <p>This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object
* available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.startNote.title);</code></p>
@@ -50,26 +62,44 @@ import shortcutService from "./shortcuts.js";
* @constructor
*/
function FrontendScriptApi(startNote, currentNote, originEntity = null, $container = null) {
- /** @property {jQuery} container of all the rendered script content */
+ /**
+ * Container of all the rendered script content
+ * @type {jQuery}
+ * */
this.$container = $container;
- /** @property {object} note where the script started executing */
+ /**
+ * Note where the script started executing
+ * @type {FNote}
+ */
this.startNote = startNote;
- /** @property {object} note where the script is currently executing */
+
+ /**
+ * Note where the script is currently executing
+ * @type {FNote}
+ */
this.currentNote = currentNote;
- /** @property {object|null} entity whose event triggered this execution */
+ /**
+ * Entity whose event triggered this execution
+ * @type {object|null}
+ */
this.originEntity = originEntity;
- /** @property {dayjs} day.js library for date manipulation. See {@link https://day.js.org} for documentation */
+ /**
+ * day.js library for date manipulation.
+ * See {@link https://day.js.org} for documentation
+ * @see https://day.js.org
+ * @type {dayjs}
+ */
this.dayjs = dayjs;
- /** @property {RightPanelWidget} */
+ /** @type {RightPanelWidget} */
this.RightPanelWidget = RightPanelWidget;
- /** @property {NoteContextAwareWidget} */
+ /** @type {NoteContextAwareWidget} */
this.NoteContextAwareWidget = NoteContextAwareWidget;
- /** @property {BasicWidget} */
+ /** @type {BasicWidget} */
this.BasicWidget = BasicWidget;
/**
@@ -142,12 +172,12 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* @deprecated you can now create/modify launchers in the top-left Menu -> Configure Launchbar
* for special needs there's also backend API's createOrUpdateLauncher()
* @param {object} opts
- * @property {string} [opts.id] - id of the button, used to identify the old instances of this button to be replaced
+ * @param {string} opts.title
+ * @param {function} opts.action - callback handling the click on the button
+ * @param {string} [opts.id] - id of the button, used to identify the old instances of this button to be replaced
* ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.
- * @property {string} opts.title
- * @property {string} [opts.icon] - name of the boxicon to be used (e.g. "time" for "bx-time" icon)
- * @property {function} opts.action - callback handling the click on the button
- * @property {string} [opts.shortcut] - keyboard shortcut for the button, e.g. "alt+t"
+ * @param {string} [opts.icon] - name of the boxicon to be used (e.g. "time" for "bx-time" icon)
+ * @param {string} [opts.shortcut] - keyboard shortcut for the button, e.g. "alt+t"
*/
this.addButtonToToolbar = async opts => {
console.warn("api.addButtonToToolbar() has been deprecated since v0.58 and may be removed in the future. Use Menu -> Configure Launchbar to create/update launchers instead.");
@@ -178,9 +208,9 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* Internally this serializes the anonymous function into string and sends it to backend via AJAX.
*
* @method
- * @param {string} script - script to be executed on the backend
- * @param {Array.<?>} params - list of parameters to the anonymous function to be sent to backend
- * @returns {Promise<*>} return value of the executed function on the backend
+ * @param {string|Function} script - script to be executed on the backend
+ * @param {Array<any>} params - list of parameters to the anonymous function to be sent to backend
+ * @returns {Promise<any>} return value of the executed function on the backend
*/
this.runOnBackend = async (script, params = []) => {
if (typeof script === "function") {
@@ -328,7 +358,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* @param {boolean} [params.showTooltip=true] - enable/disable tooltip on the link
* @param {boolean} [params.showNotePath=false] - show also whole note's path as part of the link
* @param {boolean} [params.showNoteIcon=false] - show also note icon before the title
- * @param {string} [params.title=] - custom link tile with note's title as default
+ * @param {string} [params.title] - custom link tile with note's title as default
*/
this.createLink = linkService.createLink;
@@ -569,7 +599,7 @@ export default FrontendScriptApi;
diff --git a/docs/frontend_api/widgets_basic_widget.js.html b/docs/frontend_api/widgets_basic_widget.js.html
new file mode 100644
index 000000000..01c2dc537
--- /dev/null
+++ b/docs/frontend_api/widgets_basic_widget.js.html
@@ -0,0 +1,230 @@
+
+
+
+
+ JSDoc: Source: widgets/basic_widget.js
+
+
+
+
+
+
+
+
+
+
+