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
new frontend API - getCurrentNoteContent and onNoteChange
azivnerc7a609e3495a
diff --git a/docs/backend_api/ApiToken.html b/docs/backend_api/ApiToken.htmlindex 3ac23346c5..5134611634 100644--- a/docs/backend_api/ApiToken.html+++ b/docs/backend_api/ApiToken.html@@ -288,7 +288,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/Attribute.html b/docs/backend_api/Attribute.htmlindex f8d9c6409e..8cba422619 100644--- a/docs/backend_api/Attribute.html+++ b/docs/backend_api/Attribute.html@@ -426,7 +426,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/BackendScriptApi.html b/docs/backend_api/BackendScriptApi.htmlindex 7ebaed12aa..4235dde334 100644--- a/docs/backend_api/BackendScriptApi.html+++ b/docs/backend_api/BackendScriptApi.html@@ -3814,7 +3814,7 @@ transactional by default.<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/Branch.html b/docs/backend_api/Branch.htmlindex da46e696b4..90244543e2 100644--- a/docs/backend_api/Branch.html+++ b/docs/backend_api/Branch.html@@ -384,6 +384,113 @@ Each note can have multiple (at least one) branches, meaning it can be placed in+ <h3 class="subsection-title">Methods</h3>++++++++ <h4 class="name" id="getNote"><span class="type-signature">(async) </span>getNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line38">line 38</a>+ </li></ul></dd>++++++++</dl>++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type"><a href="Note.html">Note</a></span>+|++<span class="param-type">null</span>+++ </dd>+</dl>+++++++++@@ -404,7 +511,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/Entity.html b/docs/backend_api/Entity.htmlindex 528be57b84..06d760b44a 100644--- a/docs/backend_api/Entity.html+++ b/docs/backend_api/Entity.html@@ -216,7 +216,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/Image.html b/docs/backend_api/Image.htmlindex f16a7edae4..3af2be45b0 100644--- a/docs/backend_api/Image.html+++ b/docs/backend_api/Image.html@@ -380,7 +380,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/Note.html b/docs/backend_api/Note.htmlindex 5c3b6aee2d..5b94091293 100644--- a/docs/backend_api/Note.html+++ b/docs/backend_api/Note.html@@ -613,7 +613,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#line399">line 399</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line413">line 413</a></li></ul></dd>@@ -809,7 +809,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#line437">line 437</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line451">line 451</a></li></ul></dd>@@ -1005,7 +1005,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#line446">line 446</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line460">line 460</a></li></ul></dd>@@ -1177,7 +1177,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#line207">line 207</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line221">line 221</a></li></ul></dd>@@ -1233,7 +1233,7 @@- <h4 class="name" id="getAttributes"><span class="type-signature">(async) </span>getAttributes<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<<a href="Attribute.html">Attribute</a>>>}</span></h4>+ <h4 class="name" id="getAttributes"><span class="type-signature">(async) </span>getAttributes<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<Array.<<a href="Attribute.html">Attribute</a>>>}</span></h4>@@ -1248,6 +1248,67 @@+ <h5>Parameters:</h5>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>+++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>name</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">attribute name to filter</td>+ </tr>+++ </tbody>+</table>++@@ -1281,7 +1342,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#line103">line 103</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line106">line 106</a></li></ul></dd>@@ -1457,7 +1518,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#line218">line 218</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line232">line 232</a></li></ul></dd>@@ -1561,7 +1622,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#line467">line 467</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line481">line 481</a></li></ul></dd>@@ -1661,7 +1722,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#line488">line 488</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line509">line 509</a></li></ul></dd>@@ -1765,7 +1826,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#line474">line 474</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line495">line 495</a></li></ul></dd>@@ -1918,7 +1979,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#line305">line 305</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line319">line 319</a></li></ul></dd>@@ -1974,19 +2035,80 @@- <h4 class="name" id="getLabels"><span class="type-signature">(async) </span>getLabels<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<<a href="Attribute.html">Attribute</a>>>}</span></h4>+ <h4 class="name" id="getLabels"><span class="type-signature">(async) </span>getLabels<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<Array.<<a href="Attribute.html">Attribute</a>>>}</span></h4>+++++++++++++++ <h5>Parameters:</h5>+<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>+++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+ <tr>++ <td class="name"><code>name</code></td>++ <td class="type">+++<span class="param-type">string</span>++ </td>++ <td class="attributes">++ <optional><br>+++++ </td>+++ <td class="description last">label name to filter</td>+ </tr>++ </tbody>+</table>@@ -2022,7 +2144,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#line112">line 112</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line123">line 123</a></li></ul></dd>@@ -2175,7 +2297,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#line317">line 317</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line331">line 331</a></li></ul></dd>@@ -2279,7 +2401,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#line460">line 460</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line474">line 474</a></li></ul></dd>@@ -2483,7 +2605,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#line500">line 500</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line521">line 521</a></li></ul></dd>@@ -2636,7 +2758,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#line311">line 311</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line325">line 325</a></li></ul></dd>@@ -2692,7 +2814,7 @@- <h4 class="name" id="getRelations"><span class="type-signature">(async) </span>getRelations<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<<a href="Attribute.html">Attribute</a>>>}</span></h4>+ <h4 class="name" id="getRelations"><span class="type-signature">(async) </span>getRelations<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<Array.<<a href="Attribute.html">Attribute</a>>>}</span></h4>@@ -2707,6 +2829,67 @@+ <h5>Parameters:</h5>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>+++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>name</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">relation name to filter</td>+ </tr>+++ </tbody>+</table>++@@ -2740,7 +2923,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#line117">line 117</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line131">line 131</a></li></ul></dd>@@ -2893,7 +3076,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#line385">line 385</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line399">line 399</a></li></ul></dd>@@ -3049,7 +3232,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#line323">line 323</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line337">line 337</a></li></ul></dd>@@ -3157,7 +3340,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#line453">line 453</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line467">line 467</a></li></ul></dd>@@ -3433,7 +3616,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#line198">line 198</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line212">line 212</a></li></ul></dd>@@ -3489,6 +3672,110 @@+ <h4 class="name" id="hasChildren"><span class="type-signature">(async) </span>hasChildren<span class="signature">()</span><span class="type-signature"> → {boolean}</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#line488">line 488</a>+ </li></ul></dd>++++++++</dl>++++++++++++++<h5>Returns:</h5>+++<div class="param-desc">+ - true if note has children+</div>++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">boolean</span>+++ </dd>+</dl>+++++++++++++<h4 class="name" id="hasLabel"><span class="type-signature">(async) </span>hasLabel<span class="signature">(name)</span><span class="type-signature"> → {Promise.<boolean>}</span></h4>@@ -3586,7 +3873,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#line293">line 293</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line307">line 307</a></li></ul></dd>@@ -3739,7 +4026,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#line299">line 299</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line313">line 313</a></li></ul></dd>@@ -3848,7 +4135,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#line125">line 125</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line139">line 139</a></li></ul></dd>@@ -4346,7 +4633,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#line130">line 130</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line144">line 144</a></li></ul></dd>@@ -4573,7 +4860,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#line276">line 276</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line290">line 290</a></li></ul></dd>@@ -4769,7 +5056,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#line370">line 370</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line384">line 384</a></li></ul></dd>@@ -4965,7 +5252,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#line379">line 379</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line393">line 393</a></li></ul></dd>@@ -5192,7 +5479,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#line250">line 250</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line264">line 264</a></li></ul></dd>@@ -5388,7 +5675,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#line352">line 352</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line366">line 366</a></li></ul></dd>@@ -5584,7 +5871,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#line361">line 361</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line375">line 375</a></li></ul></dd>@@ -5842,7 +6129,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#line233">line 233</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line247">line 247</a></li></ul></dd>@@ -6069,7 +6356,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#line333">line 333</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line347">line 347</a></li></ul></dd>@@ -6296,7 +6583,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#line343">line 343</a>+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line357">line 357</a></li></ul></dd>@@ -6364,7 +6651,7 @@ Cache is note instance scoped.<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/NoteImage.html b/docs/backend_api/NoteImage.htmlindex becb73367b..690c9baf5c 100644--- a/docs/backend_api/NoteImage.html+++ b/docs/backend_api/NoteImage.html@@ -334,7 +334,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/NoteRevision.html b/docs/backend_api/NoteRevision.htmlindex 328f391929..fbd8d171e0 100644--- a/docs/backend_api/NoteRevision.html+++ b/docs/backend_api/NoteRevision.html@@ -403,7 +403,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/Option.html b/docs/backend_api/Option.htmlindex 858bccd6fa..4a8482ce22 100644--- a/docs/backend_api/Option.html+++ b/docs/backend_api/Option.html@@ -311,7 +311,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/RecentNote.html b/docs/backend_api/RecentNote.htmlindex c37cd89099..07116489a5 100644--- a/docs/backend_api/RecentNote.html+++ b/docs/backend_api/RecentNote.html@@ -288,7 +288,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_api_token.js.html b/docs/backend_api/entities_api_token.js.htmlindex db27a39dde..0fc30fe887 100644--- a/docs/backend_api/entities_api_token.js.html+++ b/docs/backend_api/entities_api_token.js.html@@ -75,7 +75,7 @@ module.exports = ApiToken;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_attribute.js.html b/docs/backend_api/entities_attribute.js.htmlindex 8a97a2a1f7..a51aebe983 100644--- a/docs/backend_api/entities_attribute.js.html+++ b/docs/backend_api/entities_attribute.js.html@@ -134,7 +134,7 @@ module.exports = Attribute;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_branch.js.html b/docs/backend_api/entities_branch.js.htmlindex d6656f24d4..1de70e8a85 100644--- a/docs/backend_api/entities_branch.js.html+++ b/docs/backend_api/entities_branch.js.html@@ -55,6 +55,14 @@ class Branch extends Entity {// notePosition is not part of hash because it would produce a lot of updates in case of reorderingstatic get hashedProperties() { return ["branchId", "noteId", "parentNoteId", "isDeleted", "prefix"]; }+ constructor(row = {}) {+ super(row);++ // used to detect move in note tree+ this.origParentNoteId = this.parentNoteId;+ }++ /** @returns {Note|null} */async getNote() {return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);}@@ -97,7 +105,7 @@ module.exports = Branch;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_entity.js.html b/docs/backend_api/entities_entity.js.htmlindex 22950d4ac8..5e3b0d17f8 100644--- a/docs/backend_api/entities_entity.js.html+++ b/docs/backend_api/entities_entity.js.html@@ -93,7 +93,7 @@ module.exports = Entity;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_image.js.html b/docs/backend_api/entities_image.js.htmlindex 162876e6ce..3f31bfbd21 100644--- a/docs/backend_api/entities_image.js.html+++ b/docs/backend_api/entities_image.js.html@@ -83,7 +83,7 @@ module.exports = Image;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_note.js.html b/docs/backend_api/entities_note.js.htmlindex 0acc86d57c..feafba1368 100644--- a/docs/backend_api/entities_note.js.html+++ b/docs/backend_api/entities_note.js.html@@ -127,23 +127,37 @@ class Note extends Entity {return await repository.getEntities(`SELECT * FROM attributes WHERE isDeleted = 0 AND noteId = ?`, [this.noteId]);}- /** @returns {Promise<Attribute[]>} all note's attributes, including inherited ones */- async getAttributes() {+ /**+ * @param {string} [name] - attribute name to filter+ * @returns {Promise<Attribute[]>} all note's attributes, including inherited ones+ */+ async getAttributes(name) {if (!this.__attributeCache) {await this.loadAttributesToCache();}- return this.__attributeCache;+ if (name) {+ return this.__attributeCache.filter(attr => attr.name === name);+ }+ else {+ return this.__attributeCache;+ }}- /** @returns {Promise<Attribute[]>} all note's labels (attributes with type label), including inherited ones */- async getLabels() {- return (await this.getAttributes()).filter(attr => attr.type === LABEL);+ /**+ * @param {string} [name] - label name to filter+ * @returns {Promise<Attribute[]>} all note's labels (attributes with type label), including inherited ones+ */+ async getLabels(name) {+ return (await this.getAttributes(name)).filter(attr => attr.type === LABEL);}- /** @returns {Promise<Attribute[]>} all note's relations (attributes with type relation), including inherited ones */- async getRelations() {- return (await this.getAttributes()).filter(attr => attr.type === RELATION);+ /**+ * @param {string} [name] - relation name to filter+ * @returns {Promise<Attribute[]>} all note's relations (attributes with type relation), including inherited ones+ */+ async getRelations(name) {+ return (await this.getAttributes(name)).filter(attr => attr.type === RELATION);}/**@@ -496,6 +510,13 @@ class Note extends Entity {return await repository.getEntities("SELECT * FROM branches WHERE isDeleted = 0 AND noteId = ?", [this.noteId]);}+ /**+ * @returns {boolean} - true if note has children+ */+ async hasChildren() {+ return (await this.getChildNotes()).length > 0;+ }+/*** @returns {Promise<Note[]>} child notes of this note*/@@ -580,7 +601,7 @@ module.exports = Note;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_note_image.js.html b/docs/backend_api/entities_note_image.js.htmlindex 837bd72d2d..e60507b355 100644--- a/docs/backend_api/entities_note_image.js.html+++ b/docs/backend_api/entities_note_image.js.html@@ -90,7 +90,7 @@ module.exports = NoteImage;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_note_revision.js.html b/docs/backend_api/entities_note_revision.js.htmlindex cf2e8a7c28..129d75cca7 100644--- a/docs/backend_api/entities_note_revision.js.html+++ b/docs/backend_api/entities_note_revision.js.html@@ -91,7 +91,7 @@ module.exports = NoteRevision;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_option.js.html b/docs/backend_api/entities_option.js.htmlindex b875e83359..8acb062d1b 100644--- a/docs/backend_api/entities_option.js.html+++ b/docs/backend_api/entities_option.js.html@@ -78,7 +78,7 @@ module.exports = Option;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/entities_recent_note.js.html b/docs/backend_api/entities_recent_note.js.htmlindex 8353b2ca50..108bf9ba2f 100644--- a/docs/backend_api/entities_recent_note.js.html+++ b/docs/backend_api/entities_recent_note.js.html@@ -75,7 +75,7 @@ module.exports = RecentNote;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/global.html b/docs/backend_api/global.htmlindex 103072b40c..2e3b50f0f7 100644--- a/docs/backend_api/global.html+++ b/docs/backend_api/global.html@@ -594,7 +594,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/index.html b/docs/backend_api/index.htmlindex 5c4e117d40..6c0ee3c577 100644--- a/docs/backend_api/index.html+++ b/docs/backend_api/index.html@@ -56,7 +56,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/services_backend_script_api.js.html b/docs/backend_api/services_backend_script_api.js.htmlindex 339efbffd3..9e790304e0 100644--- a/docs/backend_api/services_backend_script_api.js.html+++ b/docs/backend_api/services_backend_script_api.js.html@@ -278,7 +278,7 @@ module.exports = BackendScriptApi;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:06 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:45 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/Branch.html b/docs/frontend_api/Branch.htmlindex 30a2c8bdad..d0a24eb022 100644--- a/docs/frontend_api/Branch.html+++ b/docs/frontend_api/Branch.html@@ -719,7 +719,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.htmlindex 5f5601c957..9cbffba061 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#line14">line 14</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line15">line 15</a></li></ul></dd>@@ -221,7 +221,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#line20">line 20</a>+ <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></li></ul></dd>@@ -334,7 +334,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#line22">line 22</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line23">line 23</a></li></ul></dd>@@ -444,7 +444,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#line18">line 18</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line19">line 19</a></li></ul></dd>@@ -573,7 +573,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#line39">line 39</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line40">line 40</a></li></ul></dd>@@ -726,7 +726,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#line31">line 31</a>+ <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></li></ul></dd>@@ -879,7 +879,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#line58">line 58</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line59">line 59</a></li></ul></dd>@@ -1057,7 +1057,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#line193">line 193</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>@@ -1188,7 +1188,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#line153">line 153</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line154">line 154</a></li></ul></dd>@@ -1244,6 +1244,110 @@+ <h4 class="name" id="getCurrentNoteContent"><span class="type-signature"></span>getCurrentNoteContent<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>+++++++++++++++++++<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#line200">line 200</a>+ </li></ul></dd>++++++++</dl>++++++++++++++<h5>Returns:</h5>+++<div class="param-desc">+ content of currently loaded note in the editor (HTML, code etc.)+</div>++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">string</span>+++ </dd>+</dl>+++++++++++++<h4 class="name" id="getInstanceName"><span class="type-signature"></span>getInstanceName<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>@@ -1297,7 +1401,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#line146">line 146</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line147">line 147</a></li></ul></dd>@@ -1496,7 +1600,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#line138">line 138</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line139">line 139</a></li></ul></dd>@@ -1544,6 +1648,137 @@ otherwise (by e.g. createNoteLink())+++++ <h4 class="name" id="onNoteChange"><span class="type-signature"></span>onNoteChange<span class="signature">(func)</span><span class="type-signature"></span></h4>+++++++++++++++ <h5>Parameters:</h5>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>func</code></td>+++ <td class="type">+++<span class="param-type">function</span>++++ </td>++++++ <td class="description last">callback called on note change</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#line206">line 206</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++@@ -1645,7 +1880,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#line160">line 160</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line161">line 161</a></li></ul></dd>@@ -1753,7 +1988,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#line184">line 184</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line185">line 185</a></li></ul></dd>@@ -1930,7 +2165,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#line106">line 106</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line107">line 107</a></li></ul></dd>@@ -2087,7 +2322,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#line176">line 176</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line177">line 177</a></li></ul></dd>@@ -2222,7 +2457,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#line168">line 168</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line169">line 169</a></li></ul></dd>@@ -2272,7 +2507,7 @@ Internally this serializes the anonymous function into string and sends it to ba<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/NoteFull.html b/docs/frontend_api/NoteFull.htmlindex bf24211a92..1c335ca925 100644--- a/docs/frontend_api/NoteFull.html+++ b/docs/frontend_api/NoteFull.html@@ -279,7 +279,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/NoteShort.html b/docs/frontend_api/NoteShort.htmlindex 97005cd98e..b01b6ee043 100644--- a/docs/frontend_api/NoteShort.html+++ b/docs/frontend_api/NoteShort.html@@ -1316,7 +1316,7 @@ Its notable omission is the note content.</div><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/entities_branch.js.html b/docs/frontend_api/entities_branch.js.htmlindex d4b1b9b863..0742712ea7 100644--- a/docs/frontend_api/entities_branch.js.html+++ b/docs/frontend_api/entities_branch.js.html@@ -76,7 +76,7 @@ export default Branch;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/entities_note_full.js.html b/docs/frontend_api/entities_note_full.js.htmlindex 5e7ba19516..742f8552d4 100644--- a/docs/frontend_api/entities_note_full.js.html+++ b/docs/frontend_api/entities_note_full.js.html@@ -64,7 +64,7 @@ export default NoteFull;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/entities_note_short.js.html b/docs/frontend_api/entities_note_short.js.htmlindex 09df0f0579..c369da1145 100644--- a/docs/frontend_api/entities_note_short.js.html+++ b/docs/frontend_api/entities_note_short.js.html@@ -128,7 +128,7 @@ export default NoteShort;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.htmlindex 63e4813bf6..2e5c12b06f 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#line45">line 45</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line46">line 46</a></li></ul></dd>@@ -339,7 +339,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.htmlindex 7546ae6607..dfc80b9982 100644--- a/docs/frontend_api/index.html+++ b/docs/frontend_api/index.html@@ -56,7 +56,7 @@<br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.htmlindex fb86853c0b..8b26e8a384 100644--- a/docs/frontend_api/services_frontend_script_api.js.html+++ b/docs/frontend_api/services_frontend_script_api.js.html@@ -32,6 +32,7 @@ import utils from './utils.js';import infoService from './info.js';import linkService from './link.js';import treeCache from './tree_cache.js';+import noteDetailService from './note_detail.js';/*** This is the main frontend API interface for scripts. It's published in the local "api" object.@@ -219,6 +220,18 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {* @param {string} [noteTitle] - if not present we'll use note title*/this.createNoteLink = linkService.createNoteLink;++ /**+ * @method+ * @returns {string} content of currently loaded note in the editor (HTML, code etc.)+ */+ this.getCurrentNoteContent = noteDetailService.getCurrentNoteContent;++ /**+ * @method+ * @param {function} func - callback called on note change+ */+ this.onNoteChange = noteDetailService.onNoteChange;}export default FrontendScriptApi;</code></pre>@@ -237,7 +250,7 @@ export default FrontendScriptApi;</code></pre><br class="clear"><footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST)+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Sep 03 2018 16:04:46 GMT+0200 (CEST)</footer><script> prettyPrint(); </script>diff --git a/src/public/javascripts/services/frontend_script_api.js b/src/public/javascripts/services/frontend_script_api.jsindex cfe9dc2e35..57590dfed3 100644--- a/src/public/javascripts/services/frontend_script_api.js+++ b/src/public/javascripts/services/frontend_script_api.js@@ -4,6 +4,7 @@ import utils from './utils.js';import infoService from './info.js';import linkService from './link.js';import treeCache from './tree_cache.js';+import noteDetailService from './note_detail.js';/*** This is the main frontend API interface for scripts. It's published in the local "api" object.@@ -191,6 +192,18 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {* @param {string} [noteTitle] - if not present we'll use note title*/this.createNoteLink = linkService.createNoteLink;++ /**+ * @method+ * @returns {string} content of currently loaded note in the editor (HTML, code etc.)+ */+ this.getCurrentNoteContent = noteDetailService.getCurrentNoteContent;++ /**+ * @method+ * @param {function} func - callback called on note change+ */+ this.onNoteChange = noteDetailService.onNoteChange;}export default FrontendScriptApi;\ No newline at end of filediff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.jsindex 7a9a6e0bc8..ad6a11a5ea 100644--- a/src/public/javascripts/services/note_detail.js+++ b/src/public/javascripts/services/note_detail.js@@ -49,6 +49,10 @@ const components = {};function getComponent(type) {+ if (!type) {+ type = getCurrentNote().type;+ }+if (components[type]) {return components[type];}@@ -93,11 +97,19 @@ async function switchToNote(noteId) {}}+function getCurrentNoteContent() {+ return getComponent().getContent();+}++function onNoteChange(func) {+ return getComponent().onNoteChange(func);+}+async function saveNote() {const note = getCurrentNote();note.title = $noteTitle.val();- note.content = getComponent(note.type).getContent();+ note.content = getCurrentNoteContent(note);// it's important to set the flag back to false immediatelly after retrieving title and content// otherwise we might overwrite another change (especially async code)@@ -107,7 +119,6 @@ async function saveNote() {await server.put('notes/' + note.noteId, note.dto);-if (note.isProtected) {protectedSessionHolder.touchProtectedSession();}@@ -549,5 +560,7 @@ export default {refreshAttributes,saveNote,saveNoteIfChanged,- noteChanged+ noteChanged,+ getCurrentNoteContent,+ onNoteChange};\ No newline at end of filediff --git a/src/public/javascripts/services/note_detail_code.js b/src/public/javascripts/services/note_detail_code.jsindex 3cd9fc099f..4ed8452f39 100644--- a/src/public/javascripts/services/note_detail_code.js+++ b/src/public/javascripts/services/note_detail_code.js@@ -35,7 +35,7 @@ async function show() {tabindex: 100});- codeEditor.on('change', noteDetailService.noteChanged);+ onNoteChange(noteDetailService.noteChanged);}$noteDetailCode.show();@@ -85,6 +85,10 @@ async function executeCurrentNote() {infoService.showMessage("Note executed");}+function onNoteChange(func) {+ codeEditor.on('change', func);+}+$(document).bind('keydown', "ctrl+return", executeCurrentNote);$executeScriptButton.click(executeCurrentNote);@@ -92,5 +96,6 @@ $executeScriptButton.click(executeCurrentNote);export default {show,getContent,- focus+ focus,+ onNoteChange}\ No newline at end of filediff --git a/src/public/javascripts/services/note_detail_file.js b/src/public/javascripts/services/note_detail_file.jsindex 724f0f50b0..d90ce502b2 100644--- a/src/public/javascripts/services/note_detail_file.js+++ b/src/public/javascripts/services/note_detail_file.js@@ -46,5 +46,6 @@ function getFileUrl() {export default {show,getContent: () => null,- focus: () => null+ focus: () => null,+ onNoteChange: () => null}\ No newline at end of filediff --git a/src/public/javascripts/services/note_detail_render.js b/src/public/javascripts/services/note_detail_render.jsindex bf5c94c49d..281e2ff565 100644--- a/src/public/javascripts/services/note_detail_render.js+++ b/src/public/javascripts/services/note_detail_render.js@@ -34,5 +34,6 @@ $renderButton.click(render);export default {show: render,getContent: () => "",- focus: () => null+ focus: () => null,+ onNoteChange: () => null}\ No newline at end of filediff --git a/src/public/javascripts/services/note_detail_search.js b/src/public/javascripts/services/note_detail_search.jsindex 0b1b8306d2..05b63e524b 100644--- a/src/public/javascripts/services/note_detail_search.js+++ b/src/public/javascripts/services/note_detail_search.js@@ -28,5 +28,6 @@ function show() {export default {getContent,show,- focus: () => null+ focus: () => null,+ onNoteChange: () => null}\ No newline at end of filediff --git a/src/public/javascripts/services/note_detail_text.js b/src/public/javascripts/services/note_detail_text.jsindex 39af122bef..9088a8c588 100644--- a/src/public/javascripts/services/note_detail_text.js+++ b/src/public/javascripts/services/note_detail_text.js@@ -29,7 +29,7 @@ async function show() {}});- textEditor.model.document.on('change:data', noteDetailService.noteChanged);+ onNoteChange(noteDetailService.noteChanged);}}@@ -105,6 +105,10 @@ async function sendMarkdownDialog() {$markdownImportTextarea.val('');}+function onNoteChange(func) {+ textEditor.model.document.on('change:data', func);+}+$markdownImportButton.click(sendMarkdownDialog);$markdownImportDialog.bind('keydown', 'ctrl+return', sendMarkdownDialog);@@ -115,5 +119,6 @@ export default {show,getEditor,getContent,- focus+ focus,+ onNoteChange}\ No newline at end of filediff --git a/src/public/javascripts/services/note_type.js b/src/public/javascripts/services/note_type.jsindex d5de6b31d7..f5f3a96791 100644--- a/src/public/javascripts/services/note_type.js+++ b/src/public/javascripts/services/note_type.js@@ -34,6 +34,7 @@ function NoteTypeModel() {{ mime: 'application/javascript;env=backend', title: 'JavaScript backend' },{ mime: 'application/json', title: 'JSON' },{ mime: 'text/x-kotlin', title: 'Kotlin' },+ { mime: 'text/x-stex', title: 'LaTex' },{ mime: 'text/x-lua', title: 'Lua' },{ mime: 'text/x-markdown', title: 'Markdown' },{ mime: 'text/x-objectivec', title: 'Objective C' },