Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
configurable keyboard shortcuts WIP
zadam643d9077fc64
diff --git a/docs/backend_api/ApiToken.html b/docs/backend_api/ApiToken.htmlindex ba16476ba9..5c512b5550 100644--- a/docs/backend_api/ApiToken.html+++ b/docs/backend_api/ApiToken.html@@ -28,7 +28,7 @@<header>- <h2><span class="attribs"><span class="type-signature"></span></span>ApiToken<span class="signature">(apiTokenId, token, isDeleted, utcDateCreated)</span><span class="type-signature"></span></h2>+ <h2><span class="attribs"><span class="type-signature"></span></span>ApiToken<span class="signature">()</span><span class="type-signature"></span></h2><div class="class-description">ApiToken is an entity representing token used to authenticate against Trilium API from client applications. Currently used only by Trilium Sender.</div>@@ -45,7 +45,7 @@- <h4 class="name" id="ApiToken"><span class="type-signature"></span>new ApiToken<span class="signature">(apiTokenId, token, isDeleted, utcDateCreated)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="ApiToken"><span class="type-signature"></span>new ApiToken<span class="signature">()</span><span class="type-signature"></span></h4>@@ -60,10 +60,15 @@- <h5>Parameters:</h5>+++++ <h5 class="subsection-title">Properties:</h5>+-<table class="params">+<table class="props"><thead><tr>@@ -180,8 +185,6 @@--<dl class="details">diff --git a/docs/backend_api/Attribute.html b/docs/backend_api/Attribute.htmlindex a42ab9c377..8df31066ff 100644--- a/docs/backend_api/Attribute.html+++ b/docs/backend_api/Attribute.html@@ -28,7 +28,7 @@<header>- <h2><span class="attribs"><span class="type-signature"></span></span>Attribute<span class="signature">(attributeId, noteId, type, name, value, position, isInheritable, isDeleted, utcDateCreated, utcDateModified)</span><span class="type-signature"></span></h2>+ <h2><span class="attribs"><span class="type-signature"></span></span>Attribute<span class="signature">()</span><span class="type-signature"></span></h2><div class="class-description">Attribute is key value pair owned by a note.</div>@@ -45,7 +45,7 @@- <h4 class="name" id="Attribute"><span class="type-signature"></span>new Attribute<span class="signature">(attributeId, noteId, type, name, value, position, isInheritable, isDeleted, utcDateCreated, utcDateModified)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="Attribute"><span class="type-signature"></span>new Attribute<span class="signature">()</span><span class="type-signature"></span></h4>@@ -60,10 +60,15 @@- <h5>Parameters:</h5>+++++ <h5 class="subsection-title">Properties:</h5>+-<table class="params">+<table class="props"><thead><tr>@@ -318,8 +323,6 @@--<dl class="details">diff --git a/docs/backend_api/BackendScriptApi.html b/docs/backend_api/BackendScriptApi.htmlindex eec8511d8d..bcc2ef0fb8 100644--- a/docs/backend_api/BackendScriptApi.html+++ b/docs/backend_api/BackendScriptApi.html@@ -396,7 +396,7 @@ the backend.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line313">line 313</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line291">line 291</a></li></ul></dd>@@ -534,7 +534,7 @@ the backend.- <h4 class="name" id="createNote"><span class="type-signature"></span>createNote<span class="signature">(parentNoteId, title, content<span class="signature-attributes">opt</span>, extraOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<{note: <a href="Note.html">Note</a>, branch: <a href="Branch.html">Branch</a>}>}</span></h4>+ <h4 class="name" id="createNote"><span class="type-signature"></span>createNote<span class="signature">(extraOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<{note: <a href="Note.html">Note</a>, branch: <a href="Branch.html">Branch</a>}>}</span></h4>@@ -576,403 +576,6 @@ the backend.<tbody>- <tr>-- <td class="name"><code>parentNoteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">------ </td>---- <td class="default">-- </td>--- <td class="description last">create new note under this parent</td>- </tr>---- <tr>-- <td class="name"><code>title</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">------ </td>---- <td class="default">-- </td>--- <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>content</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>------ </td>---- <td class="default">-- ""-- </td>--- <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>extraOptions</code></td>--- <td class="type">---<span class="param-type"><a href="global.html#CreateNoteExtraOptions">CreateNoteExtraOptions</a></span>---- </td>--- <td class="attributes">-- <optional><br>------ </td>---- <td class="default">-- {}-- </td>--- <td class="description last"></td>- </tr>--- </tbody>-</table>-------<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line198">line 198</a>- </li></ul></dd>--------</dl>----------------<h5>Returns:</h5>---<div class="param-desc">- object contains newly created entities note and branch-</div>----<dl>- <dt>- Type- </dt>- <dd>--<span class="param-type">Promise.<{note: <a href="Note.html">Note</a>, branch: <a href="Branch.html">Branch</a>}></span>--- </dd>-</dl>-------------- <h4 class="name" id="createNoteAndRefresh"><span class="type-signature"></span>createNoteAndRefresh<span class="signature">(parentNoteId, title, content<span class="signature-attributes">opt</span>, extraOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<{note: <a href="Note.html">Note</a>, branch: <a href="Branch.html">Branch</a>}>}</span></h4>-------<div class="description">- Creates new note according to given params and force all connected clients to refresh their tree.-</div>---------- <h5>Parameters:</h5>---<table class="params">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>---- <th>Default</th>--- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>parentNoteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">------ </td>---- <td class="default">-- </td>--- <td class="description last">create new note under this parent</td>- </tr>---- <tr>-- <td class="name"><code>title</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">------ </td>---- <td class="default">-- </td>--- <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>content</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>------ </td>---- <td class="default">-- ""-- </td>--- <td class="description last"></td>- </tr>---<tr><td class="name"><code>extraOptions</code></td>@@ -981,7 +584,7 @@ the backend.<td class="type">-<span class="param-type"><a href="global.html#CreateNoteExtraOptions">CreateNoteExtraOptions</a></span>+<span class="param-type"><a href="global.html#CreateNoteParams">CreateNoteParams</a></span>@@ -1048,7 +651,7 @@ the backend.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line211">line 211</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line195">line 195</a></li></ul></dd>@@ -1533,7 +1136,7 @@ the backend.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line318">line 318</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line296">line 296</a></li></ul></dd>@@ -1997,7 +1600,7 @@ the backend.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line241">line 241</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line219">line 219</a></li></ul></dd>@@ -2765,7 +2368,7 @@ if some action needs to happen on only one specific instance.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line260">line 260</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line238">line 238</a></li></ul></dd>@@ -3418,7 +3021,7 @@ if some action needs to happen on only one specific instance.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line232">line 232</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line210">line 210</a></li></ul></dd>@@ -3596,7 +3199,7 @@ if some action needs to happen on only one specific instance.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line251">line 251</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line229">line 229</a></li></ul></dd>@@ -3751,7 +3354,7 @@ if some action needs to happen on only one specific instance.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line269">line 269</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line247">line 247</a></li></ul></dd>@@ -3901,7 +3504,7 @@ if some action needs to happen on only one specific instance.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line224">line 224</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line202">line 202</a></li></ul></dd>@@ -4404,7 +4007,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line290">line 290</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line268">line 268</a></li></ul></dd>@@ -4537,7 +4140,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line276">line 276</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line254">line 254</a></li></ul></dd>@@ -4912,7 +4515,7 @@ transactional by default.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line303">line 303</a>+ <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line281">line 281</a></li></ul></dd>diff --git a/docs/backend_api/Branch.html b/docs/backend_api/Branch.htmlindex bad86000ee..dc7fe59aa3 100644--- a/docs/backend_api/Branch.html+++ b/docs/backend_api/Branch.html@@ -28,7 +28,7 @@<header>- <h2><span class="attribs"><span class="type-signature"></span></span>Branch<span class="signature">(branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h2>+ <h2><span class="attribs"><span class="type-signature"></span></span>Branch<span class="signature">()</span><span class="type-signature"></span></h2><div class="class-description">Branch represents note's placement in the tree - it's essentially pair of noteId and parentNoteId.Each note can have multiple (at least one) branches, meaning it can be placed into multiple places in the tree.</div>@@ -46,7 +46,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in- <h4 class="name" id="Branch"><span class="type-signature"></span>new Branch<span class="signature">(branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="Branch"><span class="type-signature"></span>new Branch<span class="signature">()</span><span class="type-signature"></span></h4>@@ -61,10 +61,15 @@ Each note can have multiple (at least one) branches, meaning it can be placed in- <h5>Parameters:</h5>+++++ <h5 class="subsection-title">Properties:</h5>+-<table class="params">+<table class="props"><thead><tr>@@ -296,8 +301,6 @@ Each note can have multiple (at least one) branches, meaning it can be placed in--<dl class="details">diff --git a/docs/backend_api/Note.html b/docs/backend_api/Note.htmlindex 5f8d01cc56..e9a2787428 100644--- a/docs/backend_api/Note.html+++ b/docs/backend_api/Note.html@@ -224,6 +224,29 @@+ <tr>++ <td class="name"><code>contentLength</code></td>+++ <td class="type">+++<span class="param-type">int</span>++++ </td>++++++ <td class="description last">length of content</td>+ </tr>+++<tr><td class="name"><code>isProtected</code></td>@@ -419,7 +442,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line42">line 42</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line43">line 43</a></li></ul></dd>@@ -486,6 +509,108 @@+ <h4 class="name" id="addAttribute"><span class="type-signature">(async) </span>addAttribute<span class="signature">()</span><span class="type-signature"> → {Promise.<<a href="Attribute.html">Attribute</a>>}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line482">line 482</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Promise.<<a href="Attribute.html">Attribute</a>></span>+++ </dd>+</dl>+++++++++++++<h4 class="name" id="getAttribute"><span class="type-signature">(async) </span>getAttribute<span class="signature">(type, name)</span><span class="type-signature"> → {Promise.<<a href="Attribute.html">Attribute</a>>}</span></h4>@@ -606,7 +731,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line383">line 383</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line389">line 389</a></li></ul></dd>@@ -773,7 +898,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line237">line 237</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line243">line 243</a></li></ul></dd>@@ -951,7 +1076,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line394">line 394</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line400">line 400</a></li></ul></dd>@@ -1057,7 +1182,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line678">line 678</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line710">line 710</a></li></ul></dd>@@ -1159,7 +1284,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line706">line 706</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line738">line 738</a></li></ul></dd>@@ -1265,7 +1390,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line692">line 692</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line724">line 724</a></li></ul></dd>@@ -1371,7 +1496,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line73">line 73</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line74">line 74</a></li></ul></dd>@@ -1473,7 +1598,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line578">line 578</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line610">line 610</a></li></ul></dd>@@ -1706,7 +1831,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line601">line 601</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line633">line 633</a></li></ul></dd>@@ -1904,7 +2029,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line639">line 639</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line671">line 671</a></li></ul></dd>@@ -2102,7 +2227,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line648">line 648</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line680">line 680</a></li></ul></dd>@@ -2204,7 +2329,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line108">line 108</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line109">line 109</a></li></ul></dd>@@ -2355,7 +2480,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line489">line 489</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line521">line 521</a></li></ul></dd>@@ -2522,7 +2647,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line262">line 262</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line268">line 268</a></li></ul></dd>@@ -2689,7 +2814,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line254">line 254</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line260">line 260</a></li></ul></dd>@@ -2844,7 +2969,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line501">line 501</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line533">line 533</a></li></ul></dd>@@ -2956,7 +3081,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line665">line 665</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line697">line 697</a></li></ul></dd>@@ -3058,7 +3183,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line220">line 220</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line226">line 226</a></li></ul></dd>@@ -3166,7 +3291,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line198">line 198</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line204">line 204</a></li></ul></dd>@@ -3274,7 +3399,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line718">line 718</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line750">line 750</a></li></ul></dd>@@ -3429,7 +3554,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line495">line 495</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line527">line 527</a></li></ul></dd>@@ -3596,7 +3721,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line293">line 293</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line299">line 299</a></li></ul></dd>@@ -3763,7 +3888,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line270">line 270</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line276">line 276</a></li></ul></dd>@@ -3918,7 +4043,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line513">line 513</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line545">line 545</a></li></ul></dd>@@ -4088,7 +4213,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line278">line 278</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line284">line 284</a></li></ul></dd>@@ -4239,7 +4364,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line507">line 507</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line539">line 539</a></li></ul></dd>@@ -4349,7 +4474,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line655">line 655</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line687">line 687</a></li></ul></dd>@@ -4451,7 +4576,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line177">line 177</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line183">line 183</a></li></ul></dd>@@ -4557,7 +4682,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line229">line 229</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line235">line 235</a></li></ul></dd>@@ -4735,7 +4860,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line374">line 374</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line380">line 380</a></li></ul></dd>@@ -4841,7 +4966,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line685">line 685</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line717">line 717</a></li></ul></dd>@@ -4996,7 +5121,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line477">line 477</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line509">line 509</a></li></ul></dd>@@ -5151,7 +5276,7 @@ This method can be significantly faster than the getAttributes()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line483">line 483</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line515">line 515</a></li></ul></dd>@@ -5262,7 +5387,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line301">line 301</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line307">line 307</a></li></ul></dd>@@ -5346,7 +5471,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line167">line 167</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line173">line 173</a></li></ul></dd>@@ -5452,7 +5577,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line159">line 159</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line165">line 165</a></li></ul></dd>@@ -5558,7 +5683,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line154">line 154</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line160">line 160</a></li></ul></dd>@@ -5664,7 +5789,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line149">line 149</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line155">line 155</a></li></ul></dd>@@ -5770,7 +5895,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line172">line 172</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line178">line 178</a></li></ul></dd>@@ -5876,7 +6001,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line306">line 306</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line312">line 312</a></li></ul></dd>@@ -6105,7 +6230,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line460">line 460</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line466">line 466</a></li></ul></dd>@@ -6303,7 +6428,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line564">line 564</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line596">line 596</a></li></ul></dd>@@ -6501,7 +6626,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line573">line 573</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line605">line 605</a></li></ul></dd>@@ -6730,7 +6855,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line426">line 426</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line432">line 432</a></li></ul></dd>@@ -6832,7 +6957,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line115">line 115</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line116">line 116</a></li></ul></dd>@@ -6934,7 +7059,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line144">line 144</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line150">line 150</a></li></ul></dd>@@ -7132,7 +7257,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line546">line 546</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line578">line 578</a></li></ul></dd>@@ -7330,7 +7455,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line555">line 555</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line587">line 587</a></li></ul></dd>@@ -7590,7 +7715,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line409">line 409</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line415">line 415</a></li></ul></dd>@@ -7819,7 +7944,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line527">line 527</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line559">line 559</a></li></ul></dd>@@ -8048,7 +8173,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line537">line 537</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line569">line 569</a></li></ul></dd>diff --git a/docs/backend_api/NoteRevision.html b/docs/backend_api/NoteRevision.htmlindex 7143be4fbf..2327107736 100644--- a/docs/backend_api/NoteRevision.html+++ b/docs/backend_api/NoteRevision.html@@ -28,7 +28,7 @@<header>- <h2><span class="attribs"><span class="type-signature"></span></span>NoteRevision<span class="signature">(noteRevisionId, noteId, type, mime, title, isProtected, dateLastEdited, dateCreated, utcDateLastEdited, utcDateCreated, utcDateModified)</span><span class="type-signature"></span></h2>+ <h2><span class="attribs"><span class="type-signature"></span></span>NoteRevision<span class="signature">()</span><span class="type-signature"></span></h2><div class="class-description">NoteRevision represents snapshot of note's title and content at some point in the past. It's used for seamless note versioning.</div>@@ -45,7 +45,7 @@- <h4 class="name" id="NoteRevision"><span class="type-signature"></span>new NoteRevision<span class="signature">(noteRevisionId, noteId, type, mime, title, isProtected, dateLastEdited, dateCreated, utcDateLastEdited, utcDateCreated, utcDateModified)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="NoteRevision"><span class="type-signature"></span>new NoteRevision<span class="signature">()</span><span class="type-signature"></span></h4>@@ -60,10 +60,15 @@- <h5>Parameters:</h5>+++++ <h5 class="subsection-title">Properties:</h5>+-<table class="params">+<table class="props"><thead><tr>@@ -193,6 +198,52 @@+ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>contentLength</code></td>+++ <td class="type">+++<span class="param-type">int</span>++++ </td>++++++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>isErased</code></td>+++ <td class="type">+++<span class="param-type">boolean</span>++++ </td>+++++<td class="description last"></td></tr>@@ -206,7 +257,7 @@<td class="type">-<span class="param-type">string</span>+<span class="param-type">boolean</span>@@ -341,8 +392,6 @@--<dl class="details">@@ -372,7 +421,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line33">line 33</a>+ <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line35">line 35</a></li></ul></dd>@@ -487,7 +536,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line67">line 67</a>+ <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line69">line 69</a></li></ul></dd>@@ -589,7 +638,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line53">line 53</a>+ <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line55">line 55</a></li></ul></dd>@@ -695,7 +744,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line102">line 102</a>+ <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line104">line 104</a></li></ul></dd>diff --git a/docs/backend_api/Option.html b/docs/backend_api/Option.htmlindex 6a51649006..8bde367914 100644--- a/docs/backend_api/Option.html+++ b/docs/backend_api/Option.html@@ -28,7 +28,7 @@<header>- <h2><span class="attribs"><span class="type-signature"></span></span>Option<span class="signature">(name, value, isSynced, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h2>+ <h2><span class="attribs"><span class="type-signature"></span></span>Option<span class="signature">()</span><span class="type-signature"></span></h2><div class="class-description">Option represents name-value pair, either directly configurable by the user or some system property.</div>@@ -45,7 +45,7 @@- <h4 class="name" id="Option"><span class="type-signature"></span>new Option<span class="signature">(name, value, isSynced, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="Option"><span class="type-signature"></span>new Option<span class="signature">()</span><span class="type-signature"></span></h4>@@ -60,10 +60,15 @@- <h5>Parameters:</h5>+++++ <h5 class="subsection-title">Properties:</h5>+-<table class="params">+<table class="props"><thead><tr>@@ -203,8 +208,6 @@--<dl class="details">diff --git a/docs/backend_api/RecentNote.html b/docs/backend_api/RecentNote.htmlindex 0e9b1b93c0..756a21c9d8 100644--- a/docs/backend_api/RecentNote.html+++ b/docs/backend_api/RecentNote.html@@ -28,7 +28,7 @@<header>- <h2><span class="attribs"><span class="type-signature"></span></span>RecentNote<span class="signature">(noteId, notePath, isDeleted, utcDateModified)</span><span class="type-signature"></span></h2>+ <h2><span class="attribs"><span class="type-signature"></span></span>RecentNote<span class="signature">()</span><span class="type-signature"></span></h2><div class="class-description">RecentNote represents recently visited note.</div>@@ -45,7 +45,7 @@- <h4 class="name" id="RecentNote"><span class="type-signature"></span>new RecentNote<span class="signature">(noteId, notePath, isDeleted, utcDateModified)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="RecentNote"><span class="type-signature"></span>new RecentNote<span class="signature">()</span><span class="type-signature"></span></h4>@@ -60,10 +60,15 @@- <h5>Parameters:</h5>+++++ <h5 class="subsection-title">Properties:</h5>+-<table class="params">+<table class="props"><thead><tr>@@ -180,8 +185,6 @@--<dl class="details">diff --git a/docs/backend_api/entities_api_token.js.html b/docs/backend_api/entities_api_token.js.htmlindex eda639384e..5d835d2e3c 100644--- a/docs/backend_api/entities_api_token.js.html+++ b/docs/backend_api/entities_api_token.js.html@@ -34,10 +34,10 @@ const dateUtils = require('../services/date_utils');/*** ApiToken is an entity representing token used to authenticate against Trilium API from client applications. Currently used only by Trilium Sender.*- * @param {string} apiTokenId - primary key- * @param {string} token- * @param {boolean} isDeleted - true if API token is deleted- * @param {string} utcDateCreated+ * @property {string} apiTokenId - primary key+ * @property {string} token+ * @property {boolean} isDeleted - true if API token is deleted+ * @property {string} utcDateCreated** @extends Entity*/diff --git a/docs/backend_api/entities_attribute.js.html b/docs/backend_api/entities_attribute.js.htmlindex db22d936ed..aa9220e396 100644--- a/docs/backend_api/entities_attribute.js.html+++ b/docs/backend_api/entities_attribute.js.html@@ -36,16 +36,16 @@ const sql = require('../services/sql');/*** Attribute is key value pair owned by a note.*- * @param {string} attributeId- * @param {string} noteId- * @param {string} type- * @param {string} name- * @param {string} value- * @param {int} position- * @param {boolean} isInheritable- * @param {boolean} isDeleted- * @param {string} utcDateCreated- * @param {string} utcDateModified+ * @property {string} attributeId+ * @property {string} noteId+ * @property {string} type+ * @property {string} name+ * @property {string} value+ * @property {int} position+ * @property {boolean} isInheritable+ * @property {boolean} isDeleted+ * @property {string} utcDateCreated+ * @property {string} utcDateModified** @extends Entity*/@@ -107,6 +107,10 @@ class Attribute extends Entity {async beforeSaving() {if (!this.value) {+ if (this.type === 'relation') {+ throw new Error(`Cannot save relation ${this.name} since it does not target any note.`);+ }+// null value isn't allowedthis.value = "";}diff --git a/docs/backend_api/entities_branch.js.html b/docs/backend_api/entities_branch.js.htmlindex 9ae543ca56..c8c2e48666 100644--- a/docs/backend_api/entities_branch.js.html+++ b/docs/backend_api/entities_branch.js.html@@ -37,15 +37,15 @@ const sql = require('../services/sql');* Branch represents note's placement in the tree - it's essentially pair of noteId and parentNoteId.* Each note can have multiple (at least one) branches, meaning it can be placed into multiple places in the tree.*- * @param {string} branchId - primary key- * @param {string} noteId- * @param {string} parentNoteId- * @param {int} notePosition- * @param {string} prefix- * @param {boolean} isExpanded- * @param {boolean} isDeleted- * @param {string} utcDateModified- * @param {string} utcDateCreated+ * @property {string} branchId - primary key+ * @property {string} noteId+ * @property {string} parentNoteId+ * @property {int} notePosition+ * @property {string} prefix+ * @property {boolean} isExpanded+ * @property {boolean} isDeleted+ * @property {string} utcDateModified+ * @property {string} utcDateCreated** @extends Entity*/diff --git a/docs/backend_api/entities_note.js.html b/docs/backend_api/entities_note.js.htmlindex 06ba0c295d..69877fcd7c 100644--- a/docs/backend_api/entities_note.js.html+++ b/docs/backend_api/entities_note.js.html@@ -49,6 +49,7 @@ const RELATION_DEFINITION = 'relation-definition';* @property {string} type - one of "text", "code", "file" or "render"* @property {string} mime - MIME type, e.g. "text/html"* @property {string} title - note title+ * @property {int} contentLength - length of content* @property {boolean} isProtected - true if note is protected* @property {boolean} isDeleted - true if note is deleted* @property {boolean} isErased - true if note's content is erased after it has been deleted@@ -141,8 +142,13 @@ class Note extends Entity {/** @returns {Promise} */async setContent(content) {+ if (content === null || content === undefined) {+ throw new Error(`Cannot set null content to note ${this.noteId}`);+ }+// force updating note itself so that dateModified is represented correctly even for the contentthis.forcedChange = true;+ this.contentLength = content.length;await this.save();this.content = content;@@ -498,6 +504,32 @@ class Note extends Entity {}}+ /**+ * @return {Promise<Attribute>}+ */+ async addAttribute(type, name, value = "") {+ const attr = new Attribute({+ noteId: this.noteId,+ type: type,+ name: name,+ value: value+ });++ await attr.save();++ this.invalidateAttributeCache();++ return attr;+ }++ async addLabel(name, value = "") {+ return await this.addAttribute(LABEL, name, value);+ }++ async addRelation(name, targetNoteId) {+ return await this.addAttribute(RELATION, name, targetNoteId);+ }+/*** @param {string} name - label name* @returns {Promise<boolean>} true if label exists (including inherited)@@ -767,6 +799,10 @@ class Note extends Entity {this.utcDateCreated = dateUtils.utcNowDateTime();}+ if (this.contentLength === undefined) {+ this.contentLength = -1;+ }+super.beforeSaving();if (this.isChanged) {diff --git a/docs/backend_api/entities_note_revision.js.html b/docs/backend_api/entities_note_revision.js.htmlindex 50f8befaed..8557348d0e 100644--- a/docs/backend_api/entities_note_revision.js.html+++ b/docs/backend_api/entities_note_revision.js.html@@ -39,24 +39,26 @@ const syncTableService = require('../services/sync_table');/*** NoteRevision represents snapshot of note's title and content at some point in the past. It's used for seamless note versioning.*- * @param {string} noteRevisionId- * @param {string} noteId- * @param {string} type- * @param {string} mime- * @param {string} title- * @param {string} isProtected- * @param {string} dateLastEdited- * @param {string} dateCreated- * @param {string} utcDateLastEdited- * @param {string} utcDateCreated- * @param {string} utcDateModified+ * @property {string} noteRevisionId+ * @property {string} noteId+ * @property {string} type+ * @property {string} mime+ * @property {string} title+ * @property {int} contentLength+ * @property {boolean} isErased+ * @property {boolean} isProtected+ * @property {string} dateLastEdited+ * @property {string} dateCreated+ * @property {string} utcDateLastEdited+ * @property {string} utcDateCreated+ * @property {string} utcDateModified** @extends Entity*/class NoteRevision extends Entity {static get entityName() { return "note_revisions"; }static get primaryKeyName() { return "noteRevisionId"; }- static get hashedProperties() { return ["noteRevisionId", "noteId", "title", "contentLength", "isProtected", "dateLastEdited", "dateCreated", "utcDateLastEdited", "utcDateCreated", "utcDateModified"]; }+ static get hashedProperties() { return ["noteRevisionId", "noteId", "title", "contentLength", "isErased", "isProtected", "dateLastEdited", "dateCreated", "utcDateLastEdited", "utcDateCreated", "utcDateModified"]; }constructor(row) {super(row);@@ -130,7 +132,7 @@ class NoteRevision extends Entity {async setContent(content) {// force updating note itself so that utcDateModified is represented correctly even for the contentthis.forcedChange = true;- this.contentLength = content.length;+ this.contentLength = content === null ? 0 : content.length;await this.save();this.content = content;@@ -156,6 +158,14 @@ class NoteRevision extends Entity {await syncTableService.addNoteRevisionContentSync(this.noteRevisionId);}+ beforeSaving() {+ super.beforeSaving();++ if (this.isChanged) {+ this.utcDateModified = dateUtils.utcNowDateTime();+ }+ }+// cannot be static!updatePojo(pojo) {if (pojo.isProtected) {diff --git a/docs/backend_api/entities_option.js.html b/docs/backend_api/entities_option.js.htmlindex f9dc87bab1..7b658bfdd7 100644--- a/docs/backend_api/entities_option.js.html+++ b/docs/backend_api/entities_option.js.html@@ -34,11 +34,11 @@ const dateUtils = require('../services/date_utils');/*** Option represents name-value pair, either directly configurable by the user or some system property.*- * @param {string} name- * @param {string} value- * @param {boolean} isSynced- * @param {string} utcDateModified- * @param {string} utcDateCreated+ * @property {string} name+ * @property {string} value+ * @property {boolean} isSynced+ * @property {string} utcDateModified+ * @property {string} utcDateCreated** @extends Entity*/diff --git a/docs/backend_api/entities_recent_note.js.html b/docs/backend_api/entities_recent_note.js.htmlindex 531d0482c3..b820fdcedb 100644--- a/docs/backend_api/entities_recent_note.js.html+++ b/docs/backend_api/entities_recent_note.js.html@@ -34,10 +34,10 @@ const dateUtils = require('../services/date_utils');/*** RecentNote represents recently visited note.*- * @param {string} noteId- * @param {string} notePath- * @param {boolean} isDeleted- * @param {string} utcDateModified+ * @property {string} noteId+ * @property {string} notePath+ * @property {boolean} isDeleted+ * @property {string} utcDateModified** @extends Entity*/diff --git a/docs/backend_api/global.html b/docs/backend_api/global.htmlindex 0759abe47d..542cf911b8 100644--- a/docs/backend_api/global.html+++ b/docs/backend_api/global.html@@ -290,7 +290,7 @@-<h4 class="name" id="CreateNoteExtraOptions">CreateNoteExtraOptions</h4>+<h4 class="name" id="CreateNoteParams">CreateNoteParams</h4>diff --git a/docs/backend_api/services_backend_script_api.js.html b/docs/backend_api/services_backend_script_api.js.htmlindex eb68860b62..0fbb86466d 100644--- a/docs/backend_api/services_backend_script_api.js.html+++ b/docs/backend_api/services_backend_script_api.js.html@@ -206,7 +206,7 @@ function BackendScriptApi(currentNote, apiParams) {*//**- * @typedef {object} CreateNoteExtraOptions+ * @typedef {object} CreateNoteParams* @property {boolean} [json=false] - should the note be JSON* @property {boolean} [isProtected=false] - should the note be protected* @property {string} [type='text'] - note type@@ -217,32 +217,10 @@ function BackendScriptApi(currentNote, apiParams) {/*** @method*- * @param {string} parentNoteId - create new note under this parent- * @param {string} title- * @param {string} [content=""]- * @param {CreateNoteExtraOptions} [extraOptions={}]+ * @param {CreateNoteParams} [extraOptions={}]* @returns {Promise<{note: Note, branch: Branch}>} object contains newly created entities note and branch*/- this.createNote = noteService.createNote;-- /**- * Creates new note according to given params and force all connected clients to refresh their tree.- *- * @method- *- * @param {string} parentNoteId - create new note under this parent- * @param {string} title- * @param {string} [content=""]- * @param {CreateNoteExtraOptions} [extraOptions={}]- * @returns {Promise<{note: Note, branch: Branch}>} object contains newly created entities note and branch- */- this.createNoteAndRefresh = async function(parentNoteId, title, content, extraOptions) {- const ret = await noteService.createNote(parentNoteId, title, content, extraOptions);-- ws.refreshTree();-- return ret;- };+ this.createNote = noteService.createNewNote;/*** Log given message to trilium logs.diff --git a/docs/frontend_api/Branch.html b/docs/frontend_api/Branch.htmlindex cc6fc3b03e..0b70137439 100644--- a/docs/frontend_api/Branch.html+++ b/docs/frontend_api/Branch.html@@ -719,7 +719,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.htmlindex dc8fc5a64b..5ce01216e3 100644--- a/docs/frontend_api/FrontendScriptApi.html+++ b/docs/frontend_api/FrontendScriptApi.html@@ -81,7 +81,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line21">line 21</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line22">line 22</a></li></ul></dd>@@ -223,7 +223,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line25">line 25</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line26">line 26</a></li></ul></dd>@@ -333,7 +333,113 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line30">line 30</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line31">line 31</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="keys"><span class="type-signature"></span>keys<span class="type-signature"></span></h4>+++++++++++ <h5 class="subsection-title">Properties:</h5>++++<table class="props">+ <thead>+ <tr>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>+++ <td class="type">+++<span class="param-type"><a href="KeyboardAction.html">KeyboardAction</a></span>++++ </td>++++++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>+++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line45">line 45</a></li></ul></dd>@@ -446,7 +552,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line32">line 32</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line33">line 33</a></li></ul></dd>@@ -552,7 +658,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line41">line 41</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line42">line 42</a></li></ul></dd>@@ -662,7 +768,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line28">line 28</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line29">line 29</a></li></ul></dd>@@ -771,7 +877,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line38">line 38</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line39">line 39</a></li></ul></dd>@@ -900,7 +1006,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line66">line 66</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line72">line 72</a></li></ul></dd>@@ -1055,7 +1161,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line50">line 50</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line56">line 56</a></li></ul></dd>@@ -1210,7 +1316,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line85">line 85</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line91">line 91</a></li></ul></dd>@@ -1366,7 +1472,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line384">line 384</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line390">line 390</a></li></ul></dd>@@ -1546,7 +1652,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line291">line 291</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line297">line 297</a></li></ul></dd>@@ -1679,7 +1785,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line235">line 235</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line241">line 241</a></li></ul></dd>@@ -1785,7 +1891,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line297">line 297</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line303">line 303</a></li></ul></dd>@@ -1891,7 +1997,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line303">line 303</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line309">line 309</a></li></ul></dd>@@ -2050,7 +2156,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line350">line 350</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line356">line 356</a></li></ul></dd>@@ -2157,7 +2263,7 @@ if some action needs to happen on only one specific instance.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line228">line 228</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line234">line 234</a></li></ul></dd>@@ -2312,7 +2418,7 @@ if some action needs to happen on only one specific instance.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line359">line 359</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line365">line 365</a></li></ul></dd>@@ -2468,7 +2574,7 @@ if some action needs to happen on only one specific instance.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line200">line 200</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line206">line 206</a></li></ul></dd>@@ -2669,7 +2775,7 @@ otherwise (by e.g. createNoteLink())<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line212">line 212</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line218">line 218</a></li></ul></dd>@@ -2775,7 +2881,7 @@ otherwise (by e.g. createNoteLink())<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line341">line 341</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line347">line 347</a></li></ul></dd>@@ -2930,7 +3036,7 @@ otherwise (by e.g. createNoteLink())<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line368">line 368</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line374">line 374</a></li></ul></dd>@@ -3039,7 +3145,7 @@ note.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line314">line 314</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line320">line 320</a></li></ul></dd>@@ -3194,7 +3300,7 @@ note.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line322">line 322</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line328">line 328</a></li></ul></dd>@@ -3327,7 +3433,7 @@ note.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line242">line 242</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line248">line 248</a></li></ul></dd>@@ -3433,7 +3539,7 @@ note.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line333">line 333</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line339">line 339</a></li></ul></dd>@@ -3521,7 +3627,7 @@ note.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line274">line 274</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line280">line 280</a></li></ul></dd>@@ -3627,7 +3733,7 @@ note.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line282">line 282</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line288">line 288</a></li></ul></dd>@@ -3733,7 +3839,7 @@ note.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line266">line 266</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line272">line 272</a></li></ul></dd>@@ -3888,7 +3994,7 @@ note.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line220">line 220</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line226">line 226</a></li></ul></dd>@@ -4049,7 +4155,7 @@ Internally this serializes the anonymous function into string and sends it to ba<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line135">line 135</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line141">line 141</a></li></ul></dd>@@ -4209,7 +4315,7 @@ Internally this serializes the anonymous function into string and sends it to ba<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line188">line 188</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line194">line 194</a></li></ul></dd>@@ -4365,7 +4471,7 @@ Internally this serializes the anonymous function into string and sends it to ba<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line170">line 170</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line176">line 176</a></li></ul></dd>@@ -4520,7 +4626,7 @@ Internally this serializes the anonymous function into string and sends it to ba<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line377">line 377</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line383">line 383</a></li></ul></dd>@@ -4671,7 +4777,7 @@ Internally this serializes the anonymous function into string and sends it to ba<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line328">line 328</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line334">line 334</a></li></ul></dd>@@ -4808,7 +4914,7 @@ Internally this serializes the anonymous function into string and sends it to ba<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line258">line 258</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line264">line 264</a></li></ul></dd>@@ -4945,7 +5051,7 @@ Internally this serializes the anonymous function into string and sends it to ba<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line250">line 250</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line256">line 256</a></li></ul></dd>@@ -4991,7 +5097,7 @@ Internally this serializes the anonymous function into string and sends it to ba</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/KeyboardAction.html b/docs/frontend_api/KeyboardAction.htmlnew file mode 100644index 0000000000..1877d3729a--- /dev/null+++ b/docs/frontend_api/KeyboardAction.html@@ -0,0 +1,2266 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <title>JSDoc: Class: KeyboardAction</title>++ <script src="scripts/prettify/prettify.js"> </script>+ <script src="scripts/prettify/lang-css.js"> </script>+ <!--[if lt IE 9]>+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>+ <![endif]-->+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">+</head>++<body>++<div id="main">++ <h1 class="page-title">Class: KeyboardAction</h1>+++++++<section>++<header>++ <h2><span class="attribs"><span class="type-signature"></span></span>KeyboardAction<span class="signature">()</span><span class="type-signature"></span></h2>++ <div class="class-description">blaa vlaa</div>+++</header>++<article>+ <div class="container-overview">+++++ <h2>Constructor</h2>++++ <h4 class="name" id="KeyboardAction"><span class="type-signature"></span>new KeyboardAction<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line5">line 5</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++++ </div>+++++++++++++++ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id=".AddLinkToText"><span class="type-signature">(static) </span>AddLinkToText<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line129">line 129</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".BackInNoteHistory"><span class="type-signature">(static) </span>BackInNoteHistory<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line171">line 171</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ClipboardCopy"><span class="type-signature">(static) </span>ClipboardCopy<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line93">line 93</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ClipboardCut"><span class="type-signature">(static) </span>ClipboardCut<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line105">line 105</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ClipboardPaste"><span class="type-signature">(static) </span>ClipboardPaste<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line99">line 99</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".CloneNotesTo"><span class="type-signature">(static) </span>CloneNotesTo<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line135">line 135</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".CloseTab"><span class="type-signature">(static) </span>CloseTab<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line33">line 33</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".CollapseTree"><span class="type-signature">(static) </span>CollapseTree<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line69">line 69</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".CreateNoteAfter"><span class="type-signature">(static) </span>CreateNoteAfter<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line51">line 51</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".CreateNoteInto"><span class="type-signature">(static) </span>CreateNoteInto<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line57">line 57</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".FindInText"><span class="type-signature">(static) </span>FindInText<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line207">line 207</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".FocusNote"><span class="type-signature">(static) </span>FocusNote<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line81">line 81</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ForwardInNoteHistory"><span class="type-signature">(static) </span>ForwardInNoteHistory<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line177">line 177</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".InsertDateTime"><span class="type-signature">(static) </span>InsertDateTime<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line189">line 189</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".JumpToNote"><span class="type-signature">(static) </span>JumpToNote<span class="type-signature"></span></h4>+++++<div class="description">+ Open "Jump to note" dialog+</div>++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line14">line 14</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".MarkdownToHTML"><span class="type-signature">(static) </span>MarkdownToHTML<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line21">line 21</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".MoveNotesTo"><span class="type-signature">(static) </span>MoveNotesTo<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line141">line 141</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".NewTab"><span class="type-signature">(static) </span>NewTab<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line27">line 27</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".NextTab"><span class="type-signature">(static) </span>NextTab<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line39">line 39</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".OpenDevTools"><span class="type-signature">(static) </span>OpenDevTools<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line201">line 201</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".OpenSQLConsole"><span class="type-signature">(static) </span>OpenSQLConsole<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line165">line 165</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".PreviousTab"><span class="type-signature">(static) </span>PreviousTab<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line45">line 45</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".Redo"><span class="type-signature">(static) </span>Redo<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line123">line 123</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ReloadApp"><span class="type-signature">(static) </span>ReloadApp<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line195">line 195</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".RunCurrentNote"><span class="type-signature">(static) </span>RunCurrentNote<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line87">line 87</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".RunSQL"><span class="type-signature">(static) </span>RunSQL<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line75">line 75</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ScrollToActiveNote"><span class="type-signature">(static) </span>ScrollToActiveNote<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line63">line 63</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".SearchNotes"><span class="type-signature">(static) </span>SearchNotes<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line147">line 147</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".SelectAllNotesInParent"><span class="type-signature">(static) </span>SelectAllNotesInParent<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line111">line 111</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ShowAttributes"><span class="type-signature">(static) </span>ShowAttributes<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line153">line 153</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ShowHelp"><span class="type-signature">(static) </span>ShowHelp<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line159">line 159</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ToggleFullscreen"><span class="type-signature">(static) </span>ToggleFullscreen<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line213">line 213</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ToggleZenMode"><span class="type-signature">(static) </span>ToggleZenMode<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line183">line 183</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".Undo"><span class="type-signature">(static) </span>Undo<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line117">line 117</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ZoomIn"><span class="type-signature">(static) </span>ZoomIn<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line225">line 225</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id=".ZoomOut"><span class="type-signature">(static) </span>ZoomOut<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line219">line 219</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++</article>++</section>+++++</div>++<nav>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+</nav>++<br class="clear">++<footer>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>+</footer>++<script> prettyPrint(); </script>+<script src="scripts/linenumber.js"> </script>+</body>+</html>\ No newline at end of filediff --git a/docs/frontend_api/KeyboardActions.html b/docs/frontend_api/KeyboardActions.htmlnew file mode 100644index 0000000000..0e5a93353d--- /dev/null+++ b/docs/frontend_api/KeyboardActions.html@@ -0,0 +1,280 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <title>JSDoc: Class: KeyboardActions</title>++ <script src="scripts/prettify/prettify.js"> </script>+ <script src="scripts/prettify/lang-css.js"> </script>+ <!--[if lt IE 9]>+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>+ <![endif]-->+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">+</head>++<body>++<div id="main">++ <h1 class="page-title">Class: KeyboardActions</h1>+++++++<section>++<header>++ <h2><span class="attribs"><span class="type-signature"></span></span>KeyboardActions<span class="signature">()</span><span class="type-signature"></span></h2>++ <div class="class-description">blaa vlaa</div>+++</header>++<article>+ <div class="container-overview">+++++ <h2>Constructor</h2>++++ <h4 class="name" id="KeyboardActions"><span class="type-signature"></span>new KeyboardActions<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_actions.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_actions.js.html#line5">line 5</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++++ </div>+++++++++++++++ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id="JUMP_TO"><span class="type-signature"></span>JUMP_TO<span class="type-signature"></span></h4>+++++++++++ <h5 class="subsection-title">Properties:</h5>++++<table class="props">+ <thead>+ <tr>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>++++++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>+++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_actions.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_actions.js.html#line7">line 7</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++</article>++</section>+++++</div>++<nav>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardActions.html">KeyboardActions</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+</nav>++<br class="clear">++<footer>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>+</footer>++<script> prettyPrint(); </script>+<script src="scripts/linenumber.js"> </script>+</body>+</html>\ No newline at end of filediff --git a/docs/frontend_api/NoteFull.html b/docs/frontend_api/NoteFull.htmlindex 890782f596..113ac14921 100644--- a/docs/frontend_api/NoteFull.html+++ b/docs/frontend_api/NoteFull.html@@ -449,7 +449,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/NoteShort.html b/docs/frontend_api/NoteShort.htmlindex 1823f4bfcb..110e0e051b 100644--- a/docs/frontend_api/NoteShort.html+++ b/docs/frontend_api/NoteShort.html@@ -278,7 +278,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line33">line 33</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line35">line 35</a></li></ul></dd>@@ -346,7 +346,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line40">line 40</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line42">line 42</a></li></ul></dd>@@ -414,7 +414,65 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line46">line 46</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line48">line 48</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="contentLength"><span class="type-signature"></span>contentLength<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line25">line 25</a></li></ul></dd>@@ -472,7 +530,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line35">line 35</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line37">line 37</a></li></ul></dd>@@ -530,7 +588,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line31">line 31</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line33">line 33</a></li></ul></dd>@@ -588,7 +646,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line25">line 25</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line27">line 27</a></li></ul></dd>@@ -646,7 +704,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line29">line 29</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line31">line 31</a></li></ul></dd>@@ -772,7 +830,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line38">line 38</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line40">line 40</a></li></ul></dd>@@ -840,7 +898,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line43">line 43</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line45">line 45</a></li></ul></dd>@@ -956,7 +1014,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line27">line 27</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line29">line 29</a></li></ul></dd>@@ -1104,7 +1162,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line216">line 216</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line218">line 218</a></li></ul></dd>@@ -1271,7 +1329,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line156">line 156</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line158">line 158</a></li></ul></dd>@@ -1445,7 +1503,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line227">line 227</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line229">line 229</a></li></ul></dd>@@ -1551,7 +1609,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line113">line 113</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line115">line 115</a></li></ul></dd>@@ -1653,7 +1711,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line125">line 125</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line127">line 127</a></li></ul></dd>@@ -1755,7 +1813,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line143">line 143</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line145">line 145</a></li></ul></dd>@@ -1857,7 +1915,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line148">line 148</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line150">line 150</a></li></ul></dd>@@ -2008,7 +2066,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line249">line 249</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line251">line 251</a></li></ul></dd>@@ -2175,7 +2233,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line182">line 182</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line184">line 184</a></li></ul></dd>@@ -2342,7 +2400,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line174">line 174</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line176">line 176</a></li></ul></dd>@@ -2497,7 +2555,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line261">line 261</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line263">line 263</a></li></ul></dd>@@ -2603,7 +2661,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line133">line 133</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line135">line 135</a></li></ul></dd>@@ -2705,7 +2763,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line138">line 138</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line140">line 140</a></li></ul></dd>@@ -2856,7 +2914,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line255">line 255</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line257">line 257</a></li></ul></dd>@@ -3023,7 +3081,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line198">line 198</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line200">line 200</a></li></ul></dd>@@ -3190,7 +3248,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line190">line 190</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line192">line 192</a></li></ul></dd>@@ -3345,7 +3403,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line273">line 273</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line275">line 275</a></li></ul></dd>@@ -3515,7 +3573,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line283">line 283</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line285">line 285</a></li></ul></dd>@@ -3666,7 +3724,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line267">line 267</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line269">line 269</a></li></ul></dd>@@ -3776,7 +3834,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line307">line 307</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line309">line 309</a></li></ul></dd>@@ -3950,7 +4008,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line207">line 207</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line209">line 209</a></li></ul></dd>@@ -4056,7 +4114,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line120">line 120</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line122">line 122</a></li></ul></dd>@@ -4207,7 +4265,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line237">line 237</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line239">line 239</a></li></ul></dd>@@ -4362,7 +4420,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line243">line 243</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line245">line 245</a></li></ul></dd>@@ -4473,7 +4531,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line298">line 298</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line300">line 300</a></li></ul></dd>@@ -4557,7 +4615,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line88">line 88</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line90">line 90</a></li></ul></dd>@@ -4621,7 +4679,7 @@ Cache is note instance scoped.</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/entities_attribute.js.html b/docs/frontend_api/entities_attribute.js.htmlindex 01956a8e78..2f85b38f8d 100644--- a/docs/frontend_api/entities_attribute.js.html+++ b/docs/frontend_api/entities_attribute.js.html@@ -71,7 +71,7 @@ export default Attribute;</code></pre></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/entities_branch.js.html b/docs/frontend_api/entities_branch.js.htmlindex bf5d068793..cc008e83d4 100644--- a/docs/frontend_api/entities_branch.js.html+++ b/docs/frontend_api/entities_branch.js.html@@ -70,7 +70,7 @@ export default Branch;</code></pre></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/entities_note_full.js.html b/docs/frontend_api/entities_note_full.js.htmlindex b66927b7bc..9f141a2a77 100644--- a/docs/frontend_api/entities_note_full.js.html+++ b/docs/frontend_api/entities_note_full.js.html@@ -68,7 +68,7 @@ export default NoteFull;</code></pre></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/entities_note_short.js.html b/docs/frontend_api/entities_note_short.js.htmlindex dd056d7238..8de758b829 100644--- a/docs/frontend_api/entities_note_short.js.html+++ b/docs/frontend_api/entities_note_short.js.html@@ -49,6 +49,8 @@ class NoteShort {this.noteId = row.noteId;/** @param {string} */this.title = row.title;+ /** @param {int} */+ this.contentLength = row.contentLength;/** @param {boolean} */this.isProtected = row.isProtected;/** @param {string} one of 'text', 'code', 'file' or 'render' */@@ -361,7 +363,7 @@ export default NoteShort;</code></pre></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.htmlindex 7f4006e31d..043fc4c5f0 100644--- a/docs/frontend_api/global.html+++ b/docs/frontend_api/global.html@@ -303,7 +303,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line72">line 72</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line78">line 78</a></li></ul></dd>@@ -333,7 +333,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.htmlindex 310dca3437..cd881639d3 100644--- a/docs/frontend_api/index.html+++ b/docs/frontend_api/index.html@@ -50,7 +50,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/module.exports.html b/docs/frontend_api/module.exports.htmlnew file mode 100644index 0000000000..4050b4d16d--- /dev/null+++ b/docs/frontend_api/module.exports.html@@ -0,0 +1,280 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <title>JSDoc: Class: exports</title>++ <script src="scripts/prettify/prettify.js"> </script>+ <script src="scripts/prettify/lang-css.js"> </script>+ <!--[if lt IE 9]>+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>+ <![endif]-->+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">+</head>++<body>++<div id="main">++ <h1 class="page-title">Class: exports</h1>+++++++<section>++<header>++ <h2><span class="attribs"><span class="type-signature"></span></span>exports<span class="signature">()</span><span class="type-signature"></span></h2>++ <div class="class-description">blaa vlaa</div>+++</header>++<article>+ <div class="container-overview">+++++ <h2>Constructor</h2>++++ <h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_actions.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_actions.js.html#line5">line 5</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++++ </div>+++++++++++++++ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id="JUMP_TO"><span class="type-signature"></span>JUMP_TO<span class="type-signature"></span></h4>+++++++++++ <h5 class="subsection-title">Properties:</h5>++++<table class="props">+ <thead>+ <tr>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>++++++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>+++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_keyboard_actions.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_actions.js.html#line7">line 7</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++</article>++</section>+++++</div>++<nav>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+</nav>++<br class="clear">++<footer>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>+</footer>++<script> prettyPrint(); </script>+<script src="scripts/linenumber.js"> </script>+</body>+</html>\ No newline at end of filediff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.htmlindex e97f6466a6..d03a54856b 100644--- a/docs/frontend_api/services_frontend_script_api.js.html+++ b/docs/frontend_api/services_frontend_script_api.js.html@@ -39,6 +39,7 @@ import dateNotesService from './date_notes.js';import StandardWidget from '../widgets/standard_widget.js';import ws from "./ws.js";import hoistedNoteService from "./hoisted_note.js";+import KeyboardAction from "./keyboard_action.js";/*** This is the main frontend API interface for scripts. It's published in the local "api" object.@@ -68,6 +69,11 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte/** @property {StandardWidget} */this.StandardWidget = StandardWidget;+ /** @property {KeyboardAction} */+ this.keys = new KeyboardAction();++ this.bind = keys.bind;+/*** Activates note in the tree and in the note detail.*@@ -115,7 +121,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConteconst button = $('<button>').addClass("btn btn-sm")- .click(opts.action);+ .on('click', opts.action);if (opts.icon) {button.append($("<span>").addClass("bx bx-" + opts.icon))@@ -422,7 +428,7 @@ export default FrontendScriptApi;</code></pre></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/frontend_api/services_keyboard_action.js.html b/docs/frontend_api/services_keyboard_action.js.htmlnew file mode 100644index 0000000000..f477850d8b--- /dev/null+++ b/docs/frontend_api/services_keyboard_action.js.html@@ -0,0 +1,280 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <title>JSDoc: Source: services/keyboard_action.js</title>++ <script src="scripts/prettify/prettify.js"> </script>+ <script src="scripts/prettify/lang-css.js"> </script>+ <!--[if lt IE 9]>+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>+ <![endif]-->+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">+</head>++<body>++<div id="main">++ <h1 class="page-title">Source: services/keyboard_action.js</h1>+++++++ <section>+ <article>+ <pre class="prettyprint source linenums"><code>/**+ * blaa vlaa+ */+class KeyboardAction {+ constructor(params) {+ this.optionName = params.optionName;+ }+}++/**+ * Open "Jump to note" dialog+ * @static+ */+KeyboardAction.JumpToNote = new KeyboardAction({+ optionName: "JumpToNote",+ defaultShortcuts: "mod+j",+ description: 'Open "Jump to note" dialog'+});++/** @static */+KeyboardAction.MarkdownToHTML = new KeyboardAction({+ optionName: "MarkdownToHTML",+ defaultShortcuts: "mod+return"+});++/** @static */+KeyboardAction.NewTab = new KeyboardAction({+ optionName: "NewTab",+ defaultShortcuts: "mod+t"+});++/** @static */+KeyboardAction.CloseTab = new KeyboardAction({+ optionName: "CloseTab",+ defaultShortcuts: "mod+w"+});++/** @static */+KeyboardAction.NextTab = new KeyboardAction({+ optionName: "NextTab",+ defaultShortcuts: "mod+tab"+});++/** @static */+KeyboardAction.PreviousTab = new KeyboardAction({+ optionName: "PreviousTab",+ defaultShortcuts: "mod+shift+tab"+});++/** @static */+KeyboardAction.CreateNoteAfter = new KeyboardAction({+ optionName: "CreateNoteAfter",+ defaultShortcuts: "mod+o"+});++/** @static */+KeyboardAction.CreateNoteInto = new KeyboardAction({+ optionName: "CreateNoteInto",+ defaultShortcuts: "mod+p"+});++/** @static */+KeyboardAction.ScrollToActiveNote = new KeyboardAction({+ optionName: "ScrollToActiveNote",+ defaultShortcuts: "mod+."+});++/** @static */+KeyboardAction.CollapseTree = new KeyboardAction({+ optionName: "CollapseTree",+ defaultShortcuts: "alt+c"+});++/** @static */+KeyboardAction.RunSQL = new KeyboardAction({+ optionName: "RunSQL",+ defaultShortcuts: "mod+return"+});++/** @static */+KeyboardAction.FocusNote = new KeyboardAction({+ optionName: "FocusNote",+ defaultShortcuts: "return"+});++/** @static */+KeyboardAction.RunCurrentNote = new KeyboardAction({+ optionName: "RunCurrentNote",+ defaultShortcuts: "mod+return"+});++/** @static */+KeyboardAction.ClipboardCopy = new KeyboardAction({+ optionName: "ClipboardCopy",+ defaultShortcuts: "mod+c"+});++/** @static */+KeyboardAction.ClipboardPaste = new KeyboardAction({+ optionName: "ClipboardPaste",+ defaultShortcuts: "mod+v"+});++/** @static */+KeyboardAction.ClipboardCut = new KeyboardAction({+ optionName: "ClipboardCut",+ defaultShortcuts: "mod+x"+});++/** @static */+KeyboardAction.SelectAllNotesInParent = new KeyboardAction({+ optionName: "SelectAllNotesInParent",+ defaultShortcuts: "mod+a"+});++/** @static */+KeyboardAction.Undo = new KeyboardAction({+ optionName: "Undo",+ defaultShortcuts: "mod+z"+});++/** @static */+KeyboardAction.Redo = new KeyboardAction({+ optionName: "Redo",+ defaultShortcuts: "mod+y"+});++/** @static */+KeyboardAction.AddLinkToText = new KeyboardAction({+ optionName: "AddLinkToText",+ defaultShortcuts: "mod+l"+});++/** @static */+KeyboardAction.CloneNotesTo = new KeyboardAction({+ optionName: "CloneNotesTo",+ defaultShortcuts: "mod+shift+c"+});++/** @static */+KeyboardAction.MoveNotesTo = new KeyboardAction({+ optionName: "MoveNotesTo",+ defaultShortcuts: "mod+shift+c"+});++/** @static */+KeyboardAction.SearchNotes = new KeyboardAction({+ optionName: "SearchNotes",+ defaultShortcuts: "mod+s"+});++/** @static */+KeyboardAction.ShowAttributes = new KeyboardAction({+ optionName: "ShowAttributes",+ defaultShortcuts: "alt+a"+});++/** @static */+KeyboardAction.ShowHelp = new KeyboardAction({+ optionName: "ShowHelp",+ defaultShortcuts: "f1"+});++/** @static */+KeyboardAction.OpenSQLConsole = new KeyboardAction({+ optionName: "OpenSQLConsole",+ defaultShortcuts: "alt+o"+});++/** @static */+KeyboardAction.BackInNoteHistory = new KeyboardAction({+ optionName: "BackInNoteHistory",+ defaultShortcuts: "alt+left"+});++/** @static */+KeyboardAction.ForwardInNoteHistory = new KeyboardAction({+ optionName: "ForwardInNoteHistory",+ defaultShortcuts: "alt+right"+});++/** @static */+KeyboardAction.ToggleZenMode = new KeyboardAction({+ optionName: "ToggleZenMode",+ defaultShortcuts: "alt+m"+});++/** @static */+KeyboardAction.InsertDateTime = new KeyboardAction({+ optionName: "InsertDateTime",+ defaultShortcuts: "alt+t"+});++/** @static */+KeyboardAction.ReloadApp = new KeyboardAction({+ optionName: "ReloadApp",+ defaultShortcuts: ["f5", "mod+r"]+});++/** @static */+KeyboardAction.OpenDevTools = new KeyboardAction({+ optionName: "OpenDevTools",+ defaultShortcuts: "mod+shift+i"+});++/** @static */+KeyboardAction.FindInText = new KeyboardAction({+ optionName: "FindInText",+ defaultShortcuts: "mod+f"+});++/** @static */+KeyboardAction.ToggleFullscreen = new KeyboardAction({+ optionName: "ToggleFullscreen",+ defaultShortcuts: "f11"+});++/** @static */+KeyboardAction.ZoomOut = new KeyboardAction({+ optionName: "ZoomOut",+ defaultShortcuts: "mod+-"+});++/** @static */+KeyboardAction.ZoomIn = new KeyboardAction({+ optionName: "ZoomIn",+ defaultShortcuts: "mod+="+});++export default KeyboardAction;</code></pre>+ </article>+ </section>+++++</div>++<nav>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+</nav>++<br class="clear">++<footer>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>+</footer>++<script> prettyPrint(); </script>+<script src="scripts/linenumber.js"> </script>+</body>+</html>diff --git a/docs/frontend_api/services_keyboard_actions.js.html b/docs/frontend_api/services_keyboard_actions.js.htmlnew file mode 100644index 0000000000..6e24019bda--- /dev/null+++ b/docs/frontend_api/services_keyboard_actions.js.html@@ -0,0 +1,61 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <title>JSDoc: Source: services/keyboard_action.js</title>++ <script src="scripts/prettify/prettify.js"> </script>+ <script src="scripts/prettify/lang-css.js"> </script>+ <!--[if lt IE 9]>+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>+ <![endif]-->+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">+</head>++<body>++<div id="main">++ <h1 class="page-title">Source: services/keyboard_action.js</h1>+++++++ <section>+ <article>+ <pre class="prettyprint source linenums"><code>/**+ * blaa vlaa+ */+class KeyboardActions {+ constructor() {+ /** @property {string} */+ this.JUMP_TO = "";+ }+}++export default KeyboardActions;</code></pre>+ </article>+ </section>+++++</div>++<nav>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardActions.html">KeyboardActions</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>+</nav>++<br class="clear">++<footer>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>+</footer>++<script> prettyPrint(); </script>+<script src="scripts/linenumber.js"> </script>+</body>+</html>diff --git a/package.json b/package.jsonindex e69cb2386c..54fc9b3682 100644--- a/package.json+++ b/package.json@@ -16,7 +16,7 @@"start-server": "TRILIUM_ENV=dev node ./src/www","start-electron": "TRILIUM_ENV=dev electron . --disable-gpu","build-backend-docs": "./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/entities/*.js src/services/backend_script_api.js",- "build-frontend-docs": "./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/javascripts/entities/*.js src/public/javascripts/services/frontend_script_api.js",+ "build-frontend-docs": "./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/javascripts/entities/*.js src/public/javascripts/services/keyboard_action.js src/public/javascripts/services/frontend_script_api.js","build-docs": "npm run build-backend-docs && npm run build-frontend-docs"},"dependencies": {diff --git a/src/public/javascripts/services/frontend_script_api.js b/src/public/javascripts/services/frontend_script_api.jsindex ea6d2dd01f..9d45a36770 100644--- a/src/public/javascripts/services/frontend_script_api.js+++ b/src/public/javascripts/services/frontend_script_api.js@@ -11,6 +11,7 @@ import dateNotesService from './date_notes.js';import StandardWidget from '../widgets/standard_widget.js';import ws from "./ws.js";import hoistedNoteService from "./hoisted_note.js";+import KeyboardAction from "./keyboard_action.js";/*** This is the main frontend API interface for scripts. It's published in the local "api" object.@@ -40,6 +41,9 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte/** @property {StandardWidget} */this.StandardWidget = StandardWidget;+ /** @property {KeyboardAction} */+ this.KeyboardAction = KeyboardAction;+/*** Activates note in the tree and in the note detail.*diff --git a/src/public/javascripts/services/keyboard_action.js b/src/public/javascripts/services/keyboard_action.jsnew file mode 100644index 0000000000..2d74036ec5--- /dev/null+++ b/src/public/javascripts/services/keyboard_action.js@@ -0,0 +1,261 @@+/**+ * blaa vlaa+ */+class KeyboardAction {+ constructor(params) {+ /** @property {string} */+ this.optionName = params.optionName;+ /** @property {string[]} */+ this.defaultShortcuts = Array.isArray(params.defaultShortcuts) ? params.defaultShortcuts : [params.defaultShortcuts];+ /** @property {string[]} */+ this.activeShortcuts = this.defaultShortcuts.slice();+ /** @property {string} */+ this.description = params.description;+ }++ addShortcut(shortcut) {+ this.activeShortcuts.push(shortcut);+ }++ /**+ * @param {string|string[]} shortcuts+ */+ replaceShortcuts(shortcuts) {+ this.activeShortcuts = Array.isArray(shortcuts) ? shortcuts : [shortcuts];+ }++ /** @return {KeyboardAction[]} */+ static get allActions() {+ return Object.keys(KeyboardAction)+ .map(key => KeyboardAction[key])+ .filter(obj => obj instanceof KeyboardAction);+ }+}++const ELECTRON = 1;++/**+ * Open "Jump to note" dialog+ * @static+ */+KeyboardAction.JumpToNote = new KeyboardAction({+ optionName: "JumpToNote",+ defaultShortcuts: "mod+j",+ description: 'Open "Jump to note" dialog'+});++/** @static */+KeyboardAction.MarkdownToHTML = new KeyboardAction({+ optionName: "MarkdownToHTML",+ defaultShortcuts: "mod+return"+});++/** @static */+KeyboardAction.NewTab = new KeyboardAction({+ optionName: "NewTab",+ defaultShortcuts: "mod+t",+ only: ELECTRON+});++/** @static */+KeyboardAction.CloseTab = new KeyboardAction({+ optionName: "CloseTab",+ defaultShortcuts: "mod+w",+ only: ELECTRON+});++/** @static */+KeyboardAction.NextTab = new KeyboardAction({+ optionName: "NextTab",+ defaultShortcuts: "mod+tab",+ only: ELECTRON+});++/** @static */+KeyboardAction.PreviousTab = new KeyboardAction({+ optionName: "PreviousTab",+ defaultShortcuts: "mod+shift+tab",+ only: ELECTRON+});++/** @static */+KeyboardAction.CreateNoteAfter = new KeyboardAction({+ optionName: "CreateNoteAfter",+ defaultShortcuts: "mod+o"+});++/** @static */+KeyboardAction.CreateNoteInto = new KeyboardAction({+ optionName: "CreateNoteInto",+ defaultShortcuts: "mod+p"+});++/** @static */+KeyboardAction.ScrollToActiveNote = new KeyboardAction({+ optionName: "ScrollToActiveNote",+ defaultShortcuts: "mod+."+});++/** @static */+KeyboardAction.CollapseTree = new KeyboardAction({+ optionName: "CollapseTree",+ defaultShortcuts: "alt+c"+});++/** @static */+KeyboardAction.RunSQL = new KeyboardAction({+ optionName: "RunSQL",+ defaultShortcuts: "mod+return"+});++/** @static */+KeyboardAction.FocusNote = new KeyboardAction({+ optionName: "FocusNote",+ defaultShortcuts: "return"+});++/** @static */+KeyboardAction.RunCurrentNote = new KeyboardAction({+ optionName: "RunCurrentNote",+ defaultShortcuts: "mod+return"+});++/** @static */+KeyboardAction.ClipboardCopy = new KeyboardAction({+ optionName: "ClipboardCopy",+ defaultShortcuts: "mod+c"+});++/** @static */+KeyboardAction.ClipboardPaste = new KeyboardAction({+ optionName: "ClipboardPaste",+ defaultShortcuts: "mod+v"+});++/** @static */+KeyboardAction.ClipboardCut = new KeyboardAction({+ optionName: "ClipboardCut",+ defaultShortcuts: "mod+x"+});++/** @static */+KeyboardAction.SelectAllNotesInParent = new KeyboardAction({+ optionName: "SelectAllNotesInParent",+ defaultShortcuts: "mod+a"+});++/** @static */+KeyboardAction.Undo = new KeyboardAction({+ optionName: "Undo",+ defaultShortcuts: "mod+z"+});++/** @static */+KeyboardAction.Redo = new KeyboardAction({+ optionName: "Redo",+ defaultShortcuts: "mod+y"+});++/** @static */+KeyboardAction.AddLinkToText = new KeyboardAction({+ optionName: "AddLinkToText",+ defaultShortcuts: "mod+l"+});++/** @static */+KeyboardAction.CloneNotesTo = new KeyboardAction({+ optionName: "CloneNotesTo",+ defaultShortcuts: "mod+shift+c"+});++/** @static */+KeyboardAction.MoveNotesTo = new KeyboardAction({+ optionName: "MoveNotesTo",+ defaultShortcuts: "mod+shift+c"+});++/** @static */+KeyboardAction.SearchNotes = new KeyboardAction({+ optionName: "SearchNotes",+ defaultShortcuts: "mod+s"+});++/** @static */+KeyboardAction.ShowAttributes = new KeyboardAction({+ optionName: "ShowAttributes",+ defaultShortcuts: "alt+a"+});++/** @static */+KeyboardAction.ShowHelp = new KeyboardAction({+ optionName: "ShowHelp",+ defaultShortcuts: "f1"+});++/** @static */+KeyboardAction.OpenSQLConsole = new KeyboardAction({+ optionName: "OpenSQLConsole",+ defaultShortcuts: "alt+o"+});++/** @static */+KeyboardAction.BackInNoteHistory = new KeyboardAction({+ optionName: "BackInNoteHistory",+ defaultShortcuts: "alt+left"+});++/** @static */+KeyboardAction.ForwardInNoteHistory = new KeyboardAction({+ optionName: "ForwardInNoteHistory",+ defaultShortcuts: "alt+right"+});++/** @static */+KeyboardAction.ToggleZenMode = new KeyboardAction({+ optionName: "ToggleZenMode",+ defaultShortcuts: "alt+m"+});++/** @static */+KeyboardAction.InsertDateTime = new KeyboardAction({+ optionName: "InsertDateTime",+ defaultShortcuts: "alt+t"+});++/** @static */+KeyboardAction.ReloadApp = new KeyboardAction({+ optionName: "ReloadApp",+ defaultShortcuts: ["f5", "mod+r"]+});++/** @static */+KeyboardAction.OpenDevTools = new KeyboardAction({+ optionName: "OpenDevTools",+ defaultShortcuts: "mod+shift+i"+});++/** @static */+KeyboardAction.FindInText = new KeyboardAction({+ optionName: "FindInText",+ defaultShortcuts: "mod+f"+});++/** @static */+KeyboardAction.ToggleFullscreen = new KeyboardAction({+ optionName: "ToggleFullscreen",+ defaultShortcuts: "f11"+});++/** @static */+KeyboardAction.ZoomOut = new KeyboardAction({+ optionName: "ZoomOut",+ defaultShortcuts: "mod+-"+});++/** @static */+KeyboardAction.ZoomIn = new KeyboardAction({+ optionName: "ZoomIn",+ defaultShortcuts: "mod+="+});++export default KeyboardAction;\ No newline at end of filediff --git a/src/public/javascripts/services/keys.js b/src/public/javascripts/services/keys.jsnew file mode 100644index 0000000000..64517f91be--- /dev/null+++ b/src/public/javascripts/services/keys.js@@ -0,0 +1,16 @@+class Actions {+ constructor() {+ this.JUMP_TO = "";+ }+}++const actions = new Actions();++function bind() {++}++export default {+ actions,+ bind+};\ No newline at end of filediff --git a/src/services/keyboard_actions.js b/src/services/keyboard_actions.jsnew file mode 100644index 0000000000..6a8d345b44--- /dev/null+++ b/src/services/keyboard_actions.js@@ -0,0 +1,157 @@+const ELECTRON = "electron";++const KEYBOARD_ACTIONS = [+ {+ optionName: "JumpToNote",+ defaultShortcuts: ["mod+j"],+ description: 'Open "Jump to note" dialog'+ },+ {+ optionName: "MarkdownToHTML",+ defaultShortcuts: ["mod+return"]+ },+ {+ optionName: "NewTab",+ defaultShortcuts: ["mod+t"],+ only: ELECTRON+ },+ {+ optionName: "CloseTab",+ defaultShortcuts: ["mod+w"],+ only: ELECTRON+ },+ {+ optionName: "NextTab",+ defaultShortcuts: ["mod+tab"],+ only: ELECTRON+ },+ {+ optionName: "PreviousTab",+ defaultShortcuts: ["mod+shift+tab"],+ only: ELECTRON+ },+ {+ optionName: "CreateNoteAfter",+ defaultShortcuts: ["mod+o"]+ },+ {+ optionName: "CreateNoteInto",+ defaultShortcuts: ["mod+p"]+ },+ {+ optionName: "ScrollToActiveNote",+ defaultShortcuts: ["mod+."]+ },+ {+ optionName: "CollapseTree",+ defaultShortcuts: ["alt+c"]+ },+ {+ optionName: "RunSQL",+ defaultShortcuts: ["mod+return"]+ },+ {+ optionName: "FocusNote",+ defaultShortcuts: ["return"]+ },+ {+ optionName: "RunCurrentNote",+ defaultShortcuts: ["mod+return"]+ },+ {+ optionName: "ClipboardCopy",+ defaultShortcuts: ["mod+c"]+ },+ {+ optionName: "ClipboardPaste",+ defaultShortcuts: ["mod+v"]+ },+ {+ optionName: "ClipboardCut",+ defaultShortcuts: ["mod+x"]+ },+ {+ optionName: "SelectAllNotesInParent",+ defaultShortcuts: ["mod+a"]+ },+ {+ optionName: "Undo",+ defaultShortcuts: ["mod+z"]+ },+ {+ optionName: "Redo",+ defaultShortcuts: ["mod+y"]+ },+ {+ optionName: "AddLinkToText",+ defaultShortcuts: ["mod+l"]+ },+ {+ optionName: "CloneNotesTo",+ defaultShortcuts: ["mod+shift+c"]+ },+ {+ optionName: "MoveNotesTo",+ defaultShortcuts: ["mod+shift+c"]+ },+ {+ optionName: "SearchNotes",+ defaultShortcuts: ["mod+s"]+ },+ {+ optionName: "ShowAttributes",+ defaultShortcuts: ["alt+a"]+ },+ {+ optionName: "ShowHelp",+ defaultShortcuts: ["f1"]+ },+ {+ optionName: "OpenSQLConsole",+ defaultShortcuts: ["alt+o"]+ },+ {+ optionName: "BackInNoteHistory",+ defaultShortcuts: ["alt+left"]+ },+ {+ optionName: "ForwardInNoteHistory",+ defaultShortcuts: ["alt+right"]+ },+ {+ optionName: "ToggleZenMode",+ defaultShortcuts: ["alt+m"]+ },+ {+ optionName: "InsertDateTime",+ defaultShortcuts: ["alt+t"]+ },+ {+ optionName: "ReloadApp",+ defaultShortcuts: ["f5", "mod+r"]+ },+ {+ optionName: "OpenDevTools",+ defaultShortcuts: ["mod+shift+i"]+ },+ {+ optionName: "FindInText",+ defaultShortcuts: ["mod+f"]+ },+ {+ optionName: "ToggleFullscreen",+ defaultShortcuts: ["f11"]+ },+ {+ optionName: "ZoomOut",+ defaultShortcuts: ["mod+-"]+ },+ {+ optionName: "ZoomIn",+ defaultShortcuts: ["mod+="]+ }+];++module.exports = {+ KEYBOARD_ACTIONS+};\ No newline at end of filediff --git a/src/services/options_init.js b/src/services/options_init.jsindex 2fc6472a82..12e437c3b7 100644--- a/src/services/options_init.js+++ b/src/services/options_init.js@@ -5,6 +5,7 @@ const appInfo = require('./app_info');const utils = require('./utils');const log = require('./log');const dateUtils = require('./date_utils');+const keyboardActions = require('./keyboard_actions');async function initDocumentOptions() {await optionService.createOption('documentId', utils.randomSecureToken(16), false);@@ -85,7 +86,9 @@ const defaultOptions = [async function initStartupOptions() {const optionsMap = await optionService.getOptionsMap();- for (const {name, value, isSynced} of defaultOptions) {+ const allDefaultOptions = defaultOptions.concat(getKeyboardDefaultOptions());++ for (const {name, value, isSynced} of allDefaultOptions) {if (!(name in optionsMap)) {await optionService.createOption(name, value, isSynced);@@ -94,6 +97,16 @@ async function initStartupOptions() {}}+function getKeyboardDefaultOptions() {+ return keyboardActions.KEYBOARD_ACTIONS.map(ka => {+ return {+ name: "keyboardShortcuts" + ka.optionName,+ value: JSON.stringify(ka.defaultShortcuts),+ isSynced: false+ };+ });+}+module.exports = {initDocumentOptions,initSyncedOptions,