mirror of
https://github.com/zadam/trilium.git
synced 2026-01-08 07:34:25 +01:00
docs(user): add missing jsx / HTML code blocks
This commit is contained in:
parent
20ae1f844b
commit
a613980ea4
@ -3,7 +3,7 @@
|
||||
scratch (see below) or imported from a ZIP file from a third-party developer.</p>
|
||||
<aside
|
||||
class="admonition note">
|
||||
<p><strong>Icon packs are third-party content</strong>
|
||||
<p><strong>Icon packs are third-party content</strong>
|
||||
</p>
|
||||
<p>The Trilium maintainers are not responsible for keeping these icon packs
|
||||
up to date. If you have an issue with a specific icon pack, then the issue
|
||||
|
||||
@ -15,7 +15,8 @@ class="image">
|
||||
<img style="aspect-ratio:1150/27;" src="5_New Layout_image.png"
|
||||
width="1150" height="27">
|
||||
</figure>
|
||||
<h3>Inline title</h3>
|
||||
|
||||
<h3>Inline title</h3>
|
||||
<p>In previous versions of Trilium, the title bar was fixed at all times.
|
||||
In the new layout, there is both a fixed title bar and one that scrolls
|
||||
with the text. The newly introduced title is called the <em>Inline title</em> and
|
||||
@ -41,18 +42,18 @@ class="image">
|
||||
width="910" height="104">
|
||||
<figcaption>The fixed title bar. The title only appears after scrolling past the <em>Inline title</em>.</figcaption>
|
||||
</figure>
|
||||
<h3>New note type switcher</h3>
|
||||
|
||||
<h3>New note type switcher</h3>
|
||||
<p>When a new <a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a> or
|
||||
<a
|
||||
class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> note is created, a note type switcher will appear below
|
||||
the <em>Inline title</em>. Apart from changing the note type, it's also
|
||||
possible to apply a <a href="#root/_help_KC1HB96bqqHX">template</a>.</p>
|
||||
<p>The switcher will disappear as soon as a text is entered.</p>
|
||||
<p>
|
||||
<img src="6_New Layout_image.png" width="735"
|
||||
height="143">
|
||||
</p>
|
||||
<h3>Note badges</h3>
|
||||
<img src="6_New Layout_image.png"
|
||||
width="735" height="143">
|
||||
|
||||
<h3>Note badges</h3>
|
||||
<p>Note badges appear near the fixed note title and indicate important information
|
||||
about the note such as whether it is read-only. Some of the badges are
|
||||
also interactive.</p>
|
||||
@ -62,21 +63,20 @@ class="image">
|
||||
</figure>
|
||||
<p>The following badges are available:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e27c647a2fb2066455e2838bb97b70f96"><strong>Read-only badge</strong>, which will be shown if the note is not
|
||||
<li><strong>Read-only badge</strong>, which will be shown if the note is not
|
||||
editable due to either automatic read-only or manual read-only. Clicking
|
||||
on the badge will temporarily edit the note (similar to the Edit <a href="#root/_help_XpOYSgsLkTJy">floating button</a>).</li>
|
||||
<li
|
||||
data-list-item-id="ef60c0c30855b13cd03a90d8a8152290f"><strong>Share badge</strong>, which will indicate that the current note
|
||||
<li><strong>Share badge</strong>, which will indicate that the current note
|
||||
is shared. The badge will also indicate if the share is on the local network
|
||||
(for the desktop application without <a class="reference-link" href="#root/_help_cbkrhQjrkKrh">Synchronization</a> set
|
||||
up) or publicly accessible (for the server).</li>
|
||||
<li data-list-item-id="e612e0099e7c44dd0b0a2dfe41f00e7b4"><strong>Web clip badge</strong>, which will indicate if the note was clipped
|
||||
using the <a class="reference-link" href="#root/_help_MtPxeAWVAzMg">Web Clipper</a>.
|
||||
The badge acts as a link, so it can be clicked on to navigate to the page
|
||||
or right clicked for more options.</li>
|
||||
<li data-list-item-id="e8c8d943f232b9dcf2060b06b0e778d0a"><strong>Execute badge</strong>, for <a href="#root/_help_CdNpE2pqjmI6">scripts</a> or
|
||||
<a
|
||||
href="#root/_help_YKWqdJhzi2VY">saved SQL queries</a>which have an execute button or a description.</li>
|
||||
<li><strong>Web clip badge</strong>, which will indicate if the note was clipped
|
||||
using the <a class="reference-link" href="#root/_help_MtPxeAWVAzMg">Web Clipper</a>.
|
||||
The badge acts as a link, so it can be clicked on to navigate to the page
|
||||
or right clicked for more options.</li>
|
||||
<li><strong>Execute badge</strong>, for <a href="#root/_help_CdNpE2pqjmI6">scripts</a> or
|
||||
<a
|
||||
href="#root/_help_YKWqdJhzi2VY">saved SQL queries</a>which have an execute button or a description.</li>
|
||||
</ul>
|
||||
<p>Some of these badges replace the dedicated panels at the top of the note.</p>
|
||||
<h3>Collapsible sections</h3>
|
||||
@ -86,26 +86,25 @@ class="image">
|
||||
</figure>
|
||||
<p>The following sections have been made collapsible:</p>
|
||||
<ul>
|
||||
<li class="ck-list-marker-italic" data-list-item-id="ec19f54556602e6a0baf9b108ef006a7a"><em>Promoted Attributes</em>
|
||||
<li><em>Promoted Attributes</em>
|
||||
<ul>
|
||||
<li data-list-item-id="e2e83c3aa6052259f583dbc778ae706de">For full-height notes such as <a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a>,
|
||||
<li>For full-height notes such as <a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a>,
|
||||
the promoted attributes are collapsed by default to make room.</li>
|
||||
<li
|
||||
data-list-item-id="ed77db95ba33399a342c274c5efc85dd0">The keyboard shortcut previously used to trigger the promoted attributes
|
||||
<li>The keyboard shortcut previously used to trigger the promoted attributes
|
||||
ribbon tab (which was no longer working) has been repurposed to toggle
|
||||
the promoted attributes instead.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="eb36d11574ab53fb5df25a94b21e9b413"><em>Edited Notes</em>, which appears for <a class="reference-link"
|
||||
<li><em>Edited Notes</em>, which appears for <a class="reference-link"
|
||||
href="#root/_help_l0tKav7yLHGF">Day Notes</a> is now shown underneath the
|
||||
title.
|
||||
<ul>
|
||||
<li data-list-item-id="ee67e21f9cc7b41e82fdd4bc0be330655">Whether the section is collapsed or not depends on the choice in
|
||||
<li>Whether the section is collapsed or not depends on the choice in
|
||||
<a
|
||||
class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options</a> → Appearance.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="e4f1d866d84dc1588e01f7a0073a8a98e"><em>Search Properties</em>, which appears for the full <a class="reference-link"
|
||||
<li><em>Search Properties</em>, which appears for the full <a class="reference-link"
|
||||
href="#root/_help_eIg8jdvaoNNd">Search</a> and <a class="reference-link"
|
||||
href="#root/_help_m523cpzocqaD">Saved Search</a>.</li>
|
||||
</ul>
|
||||
@ -116,19 +115,11 @@ class="image">
|
||||
a change to the document that indicates whether the document has been saved.</p>
|
||||
<p>It indicates the following states:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e18b0ea6f55c8b55c58f2b58221b75a34">
|
||||
<p><em>Unsaved</em>, if the changes will be saved soon.</p>
|
||||
</li>
|
||||
<li data-list-item-id="ef4d7326f08098852c38c625f86fdefeb">
|
||||
<p><em>Saving</em>, if the changes are being saved.</p>
|
||||
</li>
|
||||
<li data-list-item-id="e3fe2056a826febd860d2a06d88a394db">
|
||||
<p><em>Saved</em>, if all the changes were successfully saved to the server.</p>
|
||||
</li>
|
||||
<li data-list-item-id="e414b330778bf4cf8c8bd92106f700a95">
|
||||
<p><em>Error</em>, if the changes could not be saved, for example due to
|
||||
a communication server with the server.</p>
|
||||
</li>
|
||||
<li><em>Unsaved</em>, if the changes will be saved soon.</li>
|
||||
<li><em>Saving</em>, if the changes are being saved.</li>
|
||||
<li><em>Saved</em>, if all the changes were successfully saved to the server.</li>
|
||||
<li><em>Error</em>, if the changes could not be saved, for example due to
|
||||
a communication server with the server.</li>
|
||||
</ul>
|
||||
<p>After all changes have been saved, the indicator will hide automatically
|
||||
after a few seconds.</p>
|
||||
@ -139,78 +130,75 @@ class="image">
|
||||
<p>Here's how all the different tabs that were once part of the ribbon are
|
||||
now available in the new layout:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e4e724a52193eec292b0132f498b28e2e">“Formatting toolbar” was relocated to the top of the page.
|
||||
<li>“Formatting toolbar” was relocated to the top of the page.
|
||||
<ul>
|
||||
<li data-list-item-id="ec9d8994f4abad721a94554a089f6c85b">Instead of having one per split, now there is a single formatting toolbar
|
||||
<li>Instead of having one per split, now there is a single formatting toolbar
|
||||
per tab. This allows more space for the toolbar items.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="ebfad18074b46e3f162fbaa383882ae79">“Owned attributes” and “Inherited attributes” were merged and moved to
|
||||
<li>“Owned attributes” and “Inherited attributes” were merged and moved to
|
||||
the status bar region (displayed one above the other).</li>
|
||||
<li data-list-item-id="e3c5b46bc67b289baca06b1210c5b2ff1">“Basic Properties” were integrated in the <a class="reference-link"
|
||||
<li>“Basic Properties” were integrated in the <a class="reference-link"
|
||||
href="#root/_help_8YBEPzcpUgxw">Note buttons</a> menu.
|
||||
<ul>
|
||||
<li data-list-item-id="eee0c34be858b607f43d970bd478ee2ad">The only exception here is the Language combo box which can now be found
|
||||
<li>The only exception here is the Language combo box which can now be found
|
||||
in the status bar (top-right of the screen).</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="ea444f18eef5f56400f9aa537c243a135">“File” and “Image” tabs
|
||||
<li>“File” and “Image” tabs
|
||||
<ul>
|
||||
<li data-list-item-id="e9a1870922341463cc637d249e237cfd3">The buttons were moved to the right of the note title, as dedicated entries
|
||||
<li>The buttons were moved to the right of the note title, as dedicated entries
|
||||
in <a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a>.</li>
|
||||
<li
|
||||
data-list-item-id="eabde0c91d6c7fc44835221b14e7e27ae">The info section has been merged into the <em>Note info</em> section of
|
||||
<li>The info section has been merged into the <em>Note info</em> section of
|
||||
the status bar.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="e0ad47e6386b1a8df602021d9a971ea46">Edited notes
|
||||
<li>Edited notes
|
||||
<ul>
|
||||
<li data-list-item-id="e632ebb7cc4006257ae194245b014f9f0">Moved underneath the title, displayed under a collapsible area and the
|
||||
<li>Moved underneath the title, displayed under a collapsible area and the
|
||||
notes are represented as badges/chips.</li>
|
||||
<li data-list-item-id="e3954fdff89bbd93839a38b56fa522f2a">Whether the section is expanded or collapsed depends on the “Edited Notes
|
||||
<li>Whether the section is expanded or collapsed depends on the “Edited Notes
|
||||
ribbon tab will automatically open on day notes” setting from Options →
|
||||
Appearance.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="e69502ea8c2f20c3ae5132d9122db4c62">Search definition tab
|
||||
<li>Search definition tab
|
||||
<ul>
|
||||
<li data-list-item-id="e80a71a94f6e1de008cd053cee6c88233">Moved underneath the title under a collapsible area.</li>
|
||||
<li data-list-item-id="e7e1ddae18168eceacf921be46f0c8ee5">Expanded by default for new searches, collapsed for saved searches.</li>
|
||||
<li>Moved underneath the title under a collapsible area.</li>
|
||||
<li>Expanded by default for new searches, collapsed for saved searches.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="e4084159f41b1ba0e29a827fb80eadb23">The Note map is now available in the Note actions menu.
|
||||
<li>The Note map is now available in the Note actions menu.
|
||||
<ul>
|
||||
<li data-list-item-id="e193c55be765a3949a9578354c722ede5">Instead of opening into a panel in the ribbon, the note map now opens
|
||||
<li>Instead of opening into a panel in the ribbon, the note map now opens
|
||||
in a side split (similar to the in-app help).</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="eebd3e1c9108a38eb9658ffe75045422f">“Note info” tab was moved to a small (i) icon in the status bar.</li>
|
||||
<li
|
||||
data-list-item-id="e65f1a8b738e67ad6c4a6b9f27c926701">“Similar notes” tab
|
||||
<li>“Note info” tab was moved to a small (i) icon in the status bar.</li>
|
||||
<li>“Similar notes” tab
|
||||
<ul>
|
||||
<li data-list-item-id="ec9530445e061ad95879833d0c3818acc">Moved to the status bar, by going to the “Note info” section and pressing
|
||||
<li>Moved to the status bar, by going to the “Note info” section and pressing
|
||||
the button to show similar notes.</li>
|
||||
<li data-list-item-id="e4f55a13d7404cb1deb1135fa69d29292">Displayed as a fixed panel, similar to the attributes.</li>
|
||||
<li>Displayed as a fixed panel, similar to the attributes.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="eae03caa575e445fff79d7515b37a865b">The Collection properties tab were relocated under the note title and
|
||||
grouped into:
|
||||
<ul>
|
||||
<li data-list-item-id="e239167382e9f975f1a4e173ab0765806">A combo box to quickly switch between views.</li>
|
||||
<li data-list-item-id="ebca89c6a405b4f5e0c2a0297b3bcdb7b">Individual settings for the current view in a submenu.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="ed0020506e136cf9e10339b8b43c0a871">Some smaller ribbon tabs were converted to badges that appear near the
|
||||
note title in the breadcrumb section:
|
||||
<ul>
|
||||
<li data-list-item-id="e3dd382eb6392e49f0dbb7a0424fd2967">Original URL indicator for clipped web pages (<code spellcheck="false">#pageUrl</code>).</li>
|
||||
<li
|
||||
data-list-item-id="e819c1d03763d1643af2b9da6695eccaa">SQL and script execute buttons.</li>
|
||||
</li>
|
||||
<li>The Collection properties tab were relocated under the note title and
|
||||
grouped into:
|
||||
<ul>
|
||||
<li>A combo box to quickly switch between views.</li>
|
||||
<li>Individual settings for the current view in a submenu.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
<li>Some smaller ribbon tabs were converted to badges that appear near the
|
||||
note title in the breadcrumb section:
|
||||
<ul>
|
||||
<li>Original URL indicator for clipped web pages (<code>#pageUrl</code>).</li>
|
||||
<li>SQL and script execute buttons.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<aside class="admonition note">
|
||||
<p>The ribbon keyboard shortcuts (e.g. <code spellcheck="false">toggleRibbonTabClassicEditor</code>)
|
||||
<p>The ribbon keyboard shortcuts (e.g. <code>toggleRibbonTabClassicEditor</code>)
|
||||
have been repurposed to work on the new layout, where they will toggle
|
||||
the appropriate panel.</p>
|
||||
</aside>
|
||||
@ -219,13 +207,11 @@ class="image">
|
||||
the <a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a> area,
|
||||
with the exception of:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="efe8209d6c6fd0e90b4cc1c8923fb1be7">The Edit button is displayed near the note title, as a badge.</li>
|
||||
<li
|
||||
data-list-item-id="ef5b93dbd5f2df8eaede5a71dbba00fcf"><em>Backlinks</em> is displayed in the status bar. When clicked, the same
|
||||
<li>The Edit button is displayed near the note title, as a badge.</li>
|
||||
<li><em>Backlinks</em> is displayed in the status bar. When clicked, the same
|
||||
list of backlinks is displayed.</li>
|
||||
<li data-list-item-id="e9ffa907f97720695d82b0f2463166478">Relation map zoom buttons are now part of the relation map itself.</li>
|
||||
<li
|
||||
data-list-item-id="e6406bd30bb1f1cbcb5f707c82cc8f4a6">Export image to PNG/SVG are now in the Note actions menu, in the <em>Export as image</em> option.</li>
|
||||
<li>Relation map zoom buttons are now part of the relation map itself.</li>
|
||||
<li>Export image to PNG/SVG are now in the Note actions menu, in the <em>Export as image</em> option.</li>
|
||||
</ul>
|
||||
<h3>Changes to the sidebar</h3>
|
||||
<p>The sidebar (also known as the right pane) also received some important
|
||||
|
||||
75
apps/server/src/assets/doc_notes/en/User Guide/User Guide/FAQ.html
generated
vendored
75
apps/server/src/assets/doc_notes/en/User Guide/User Guide/FAQ.html
generated
vendored
@ -25,14 +25,14 @@
|
||||
<p>Common request is to allow multiple users collaborate, share notes etc.
|
||||
So far I'm resisting this because of these reasons:</p>
|
||||
<ul>
|
||||
<li>it's a huge feature, or rather a Pandora's box of collaboration features
|
||||
<li data-list-item-id="e43d78c1f5b229189a5900c5ad1ad21d0">it's a huge feature, or rather a Pandora's box of collaboration features
|
||||
like user management, permissions, conflict resolution, real-time editing
|
||||
of a note by multiple people etc. This would be a huge amount of work.
|
||||
Trilium Notes is project made mostly by one person in free time and that's
|
||||
unlikely to change in the future.</li>
|
||||
<li>given its size it would probably pivot the attention away from my main
|
||||
<li data-list-item-id="e8531a103221f9c2ae39866f1c1cb4b8b">given its size it would probably pivot the attention away from my main
|
||||
focus which is a personal note-taking</li>
|
||||
<li>the assumption that only single person has access to the app simplifies
|
||||
<li data-list-item-id="e9bb4f196b1b7ac0f0dfa7965927fdc4f">the assumption that only single person has access to the app simplifies
|
||||
many things, or just outright makes them possible. In multi-user app, our
|
||||
<a
|
||||
href="#root/_help_CdNpE2pqjmI6">scripting</a>support would be a XSS security hole, while with the single
|
||||
@ -44,19 +44,19 @@
|
||||
run two Trilium processes (from one installation), each connected to a
|
||||
separate document. To achieve this, you need to set a location for the
|
||||
<a
|
||||
href="#root/_help_tAassRL4RSQL">data directory</a>in the <code>TRILIUM_DATA_DIR</code> environment variable
|
||||
and separate port on <code>TRILIUM_PORT</code> environment variable. How
|
||||
to do that depends on the platform, in Unix-based systems you can achieve
|
||||
that by running command such as this:</p><pre><code class="language-text-x-trilium-auto">TRILIUM_DATA_DIR=/home/me/path/to/data/dir TRILIUM_PORT=12345 trilium </code></pre>
|
||||
<p>You can save this command into a <code>.sh</code> script file or make an
|
||||
alias. Do this similarly for a second instance with different data directory
|
||||
and port.</p>
|
||||
href="#root/_help_tAassRL4RSQL">data directory</a>in the <code spellcheck="false">TRILIUM_DATA_DIR</code> environment
|
||||
variable and separate port on <code spellcheck="false">TRILIUM_PORT</code> environment
|
||||
variable. How to do that depends on the platform, in Unix-based systems
|
||||
you can achieve that by running command such as this:</p><pre><code class="language-text-x-sh">TRILIUM_DATA_DIR=/home/me/path/to/data/dir TRILIUM_PORT=12345 trilium </code></pre>
|
||||
<p>You can save this command into a <code spellcheck="false">.sh</code> script
|
||||
file or make an alias. Do this similarly for a second instance with different
|
||||
data directory and port.</p>
|
||||
<h2>Can I use Dropbox / Google Drive / OneDrive to sync data across multiple computers.</h2>
|
||||
<p>No.</p>
|
||||
<p>These general purpose sync apps are not suitable to sync database files
|
||||
which are open and being worked on by another application. The result is
|
||||
that they will corrupt the database file, resulting in data loss and this
|
||||
message in the Trilium logs:</p><pre><code class="language-text-x-trilium-auto">SqliteError: database disk image is malformed</code></pre>
|
||||
message in the Trilium logs:</p><pre><code class="language-text-plain">SqliteError: database disk image is malformed</code></pre>
|
||||
<p>The only supported way to sync Trilium's data across the network is to
|
||||
use a <a href="#root/_help_cbkrhQjrkKrh">sync/web server</a>.</p>
|
||||
<h2>Why database instead of flat files?</h2>
|
||||
@ -69,37 +69,40 @@
|
||||
with probably more problems.</p>
|
||||
<p>More detailed answer:</p>
|
||||
<ul>
|
||||
<li><a href="#root/_help_IakOLONlIfGI">clones</a> are what you might call "hard directory
|
||||
<li data-list-item-id="ea3cf8a951b321053b3def23e65b1a612"><a href="#root/_help_IakOLONlIfGI">clones</a> are what you might call "hard directory
|
||||
link" in filesystem lingo, but this concept is not implemented in any filesystem</li>
|
||||
<li>filesystems make a distinction between directory and file while there's
|
||||
<li
|
||||
data-list-item-id="eb0fcfc88860786c2b886fcc93ad1b738">filesystems make a distinction between directory and file while there's
|
||||
intentionally no such difference in Trilium</li>
|
||||
<li>files are stored in no particular order and user can't change this</li>
|
||||
<li>Trilium allows storing note <a href="#root/_help_zEY4DaJG4YT5">attributes</a> which
|
||||
could be represented in extended user attributes but their support differs
|
||||
greatly among different filesystems / operating systems</li>
|
||||
<li>Trilium makes links / relations between different notes which can be quickly
|
||||
retrieved / navigated (e.g. for <a href="#root/_help_BCkXAVs63Ttv">note map</a>).
|
||||
There's no such support in file systems which means these would have to
|
||||
be stored in some kind of side-car files (mini-databases).</li>
|
||||
<li>Filesystems are generally not transactional. While this is not completely
|
||||
required for a note-taking application, having transactions make it way
|
||||
easier to keep notes and their metadata in predictable and consistent state.</li>
|
||||
<li data-list-item-id="ec97e7cc69164f29f8d7919ef791a1631">files are stored in no particular order and user can't change this</li>
|
||||
<li
|
||||
data-list-item-id="e01ea1889d242bd2fadbeca1b1c315fcb">Trilium allows storing note <a href="#root/_help_zEY4DaJG4YT5">attributes</a> which
|
||||
could be represented in extended user attributes but their support differs
|
||||
greatly among different filesystems / operating systems</li>
|
||||
<li data-list-item-id="e0f4f8ea6d6f0e01fdeacdd900c8b6831">Trilium makes links / relations between different notes which can be quickly
|
||||
retrieved / navigated (e.g. for <a href="#root/_help_BCkXAVs63Ttv">note map</a>).
|
||||
There's no such support in file systems which means these would have to
|
||||
be stored in some kind of side-car files (mini-databases).</li>
|
||||
<li data-list-item-id="e9288104330d48d5fadc0f051febec972">Filesystems are generally not transactional. While this is not completely
|
||||
required for a note-taking application, having transactions make it way
|
||||
easier to keep notes and their metadata in predictable and consistent state.</li>
|
||||
</ul>
|
||||
<h2>Search-related Questions</h2>
|
||||
<h3>Why does search sometimes find results with typos?</h3>
|
||||
<p>Trilium uses a progressive search strategy that includes fuzzy matching
|
||||
when exact matches return fewer than 5 results. This finds notes despite
|
||||
minor typos in your search query. You can use fuzzy search operators (<code>~=</code> for
|
||||
fuzzy exact match and <code>~*</code> for fuzzy contains). See the
|
||||
<a
|
||||
class="reference-link" href="#root/_help_eIg8jdvaoNNd">Search</a> documentation for details.</p>
|
||||
minor typos in your search query. You can use fuzzy search operators (
|
||||
<code
|
||||
spellcheck="false">~=</code>for fuzzy exact match and <code spellcheck="false">~*</code> for
|
||||
fuzzy contains). See the <a class="reference-link" href="#root/_help_eIg8jdvaoNNd">Search</a> documentation
|
||||
for details.</p>
|
||||
<h3>How can I search for notes when I'm not sure of the exact spelling?</h3>
|
||||
<p>Use the fuzzy search operators:</p>
|
||||
<ul>
|
||||
<li><code>#title ~= "projct"</code> - finds notes with titles like "project"
|
||||
despite the typo</li>
|
||||
<li><code>note.content ~* "algoritm"</code> - finds content containing "algorithm"
|
||||
or similar words</li>
|
||||
<li data-list-item-id="e86fd90b78ff844273439cc79a7225854"><code spellcheck="false">#title ~= "projct"</code> - finds notes with titles
|
||||
like "project" despite the typo</li>
|
||||
<li data-list-item-id="e1c157f6b78a6e67d1d5c8ddfd75fa462"><code spellcheck="false">note.content ~* "algoritm"</code> - finds content
|
||||
containing "algorithm" or similar words</li>
|
||||
</ul>
|
||||
<h3>Why do some search results appear before others with lower scores?</h3>
|
||||
<p>Trilium places exact matches before fuzzy matches. When you search for
|
||||
@ -108,9 +111,9 @@
|
||||
factors.</p>
|
||||
<h3>How can I make my searches faster?</h3>
|
||||
<ol>
|
||||
<li>Use the "Fast search" option to search only titles and attributes (not
|
||||
<li data-list-item-id="e175aefc215fa8f275ce736bac67d0669">Use the "Fast search" option to search only titles and attributes (not
|
||||
content)</li>
|
||||
<li>Limit search scope using the "Ancestor" field</li>
|
||||
<li>Set a result limit to prevent loading too many results</li>
|
||||
<li>For large databases, consider archiving old notes to reduce search scope</li>
|
||||
<li data-list-item-id="eb22ee033ebaa78eb9b42268bd482a47d">Limit search scope using the "Ancestor" field</li>
|
||||
<li data-list-item-id="ef92336bcda198825a3a5b60aee2b7afe">Set a result limit to prevent loading too many results</li>
|
||||
<li data-list-item-id="e464f8a3aa32d3cb76e4cdf26b16cc797">For large databases, consider archiving old notes to reduce search scope</li>
|
||||
</ol>
|
||||
61
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/File.html
generated
vendored
61
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/File.html
generated
vendored
@ -4,14 +4,13 @@
|
||||
<p>Since these files come from an external source, it is not possible to
|
||||
create a <em>File</em> note type directly:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e838d2edcf20254924c6945bb0677bc35">Drag a file into the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</li>
|
||||
<li
|
||||
data-list-item-id="e87405721a8eca37bf5258ce1a7d40847">Right click a note and select <em>Import into note</em> and point it to
|
||||
<li>Drag a file into the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</li>
|
||||
<li>Right click a note and select <em>Import into note</em> and point it to
|
||||
one of the supported files.</li>
|
||||
</ul>
|
||||
<h2>Supported file types</h2>
|
||||
<h3>PDFs</h3>
|
||||
<p>See <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/W8vYD3Q1zjCR/_help_XJGJrpu7F9sh">PDFs</a>.</p>
|
||||
<p>See <a class="reference-link" href="#root/_help_XJGJrpu7F9sh">PDFs</a>.</p>
|
||||
<h3>Images</h3>
|
||||
<figure class="image image-style-align-center image_resized" style="width:50%;">
|
||||
<img style="aspect-ratio:879/766;" src="3_File_image.png"
|
||||
@ -19,13 +18,13 @@
|
||||
</figure>
|
||||
<p>Interaction:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e2a48d88d6adf1a0d7467cb8a1c70084a"><em>Copy reference to clipboard</em>, for embedding the image within
|
||||
<li><em>Copy reference to clipboard</em>, for embedding the image within
|
||||
<a
|
||||
class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a> notes.
|
||||
<ul>
|
||||
<li data-list-item-id="ec686b380d3dc321b2d99d709315942d3">See <a class="reference-link" href="#root/_help_0Ofbk1aSuVRu">Image references</a> for
|
||||
<li>See <a class="reference-link" href="#root/_help_0Ofbk1aSuVRu">Image references</a> for
|
||||
more information.</li>
|
||||
<li data-list-item-id="e0502ddadf07a7e370462c08e9ef09ee4">Alternatively, press the corresponding button from the <a class="reference-link"
|
||||
<li>Alternatively, press the corresponding button from the <a class="reference-link"
|
||||
href="#root/_help_XpOYSgsLkTJy">Floating buttons</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -56,11 +55,11 @@
|
||||
be used to play it.</p>
|
||||
<p>Interactions:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e3361343c2087cd5fd90f446c2db3aceb">The audio can be played/paused using the dedicated button.</li>
|
||||
<li data-list-item-id="e0681c0b088d2937257b1afc8d2ce3f04">Dragging the mouse across, or clicking the progress bar will seek through
|
||||
<li>The audio can be played/paused using the dedicated button.</li>
|
||||
<li>Dragging the mouse across, or clicking the progress bar will seek through
|
||||
the song.</li>
|
||||
<li data-list-item-id="e8d0e58bde64158d92b0a82e735299eb5">The volume can be set.</li>
|
||||
<li data-list-item-id="e76438c11c21e615066915ef5289732ab">The playback speed can be adjusted via the contextual menu next to the
|
||||
<li>The volume can be set.</li>
|
||||
<li>The playback speed can be adjusted via the contextual menu next to the
|
||||
volume.</li>
|
||||
</ul>
|
||||
<h3>Text files</h3>
|
||||
@ -93,35 +92,33 @@
|
||||
file externally, but there will be no preview of the content.</p>
|
||||
<h2>Interaction</h2>
|
||||
<ul>
|
||||
<li data-list-item-id="e4b886a9448519b3cdd4b972fbde1a8fb">Regardless of the file type, a series of buttons will be displayed in
|
||||
<li>Regardless of the file type, a series of buttons will be displayed in
|
||||
the <em>Image</em> or <em>File</em> tab in the <a class="reference-link"
|
||||
href="#root/_help_BlN9DFI679QC">Ribbon</a>.
|
||||
<ul>
|
||||
<li data-list-item-id="e50be8d9eea4871abc3d51a92ae05f136"><em>Download</em>, which will download the file for local use.</li>
|
||||
<li
|
||||
data-list-item-id="eec24704d1d2a5642d0881e38d5090b54"><em>Open</em>, will will open the file with the system-default application.</li>
|
||||
<li
|
||||
data-list-item-id="e5e576572cf69eb14753f33755f8a25b6">Upload new revision to replace the file with a new one.</li>
|
||||
<li><em>Download</em>, which will download the file for local use.</li>
|
||||
<li><em>Open</em>, will will open the file with the system-default application.</li>
|
||||
<li>Upload new revision to replace the file with a new one.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="ee5a73a8d726754636a45086dd1612616">It is <strong>not</strong> possible to change the note type of a <em>File</em> note.</li>
|
||||
<li
|
||||
data-list-item-id="e3f6f719f94482df13f687503378d15cc">Convert into an <a href="#root/_help_0vhv7lsOLy82">attachment</a> from the <a href="#root/_help_8YBEPzcpUgxw">note menu</a>.</li>
|
||||
</li>
|
||||
<li>It is <strong>not</strong> possible to change the note type of a <em>File</em> note.</li>
|
||||
<li>Convert into an <a href="#root/_help_0vhv7lsOLy82">attachment</a> from the <a href="#root/_help_8YBEPzcpUgxw">note menu</a>.</li>
|
||||
</ul>
|
||||
<h2>Relation with other notes</h2>
|
||||
<ul>
|
||||
<li data-list-item-id="eb364a811b42ed28431d698b7e617523f">
|
||||
<li>
|
||||
<p>Files are also displayed in the <a class="reference-link" href="#root/_help_0ESUbbAxVnoK">Note List</a> based
|
||||
on their type:</p>
|
||||
<p>
|
||||
<img class="image_resized" style="aspect-ratio:853/315;width:50%;" src="5_File_image.png"
|
||||
width="853" height="315">
|
||||
</p>
|
||||
<img class="image_resized" style="aspect-ratio:853/315;width:50%;"
|
||||
src="5_File_image.png" width="853" height="315">
|
||||
</li>
|
||||
<li>
|
||||
<p>Non-image files can be embedded into text notes as read-only widgets via
|
||||
the <a class="reference-link" href="#root/_help_nBAXQFj20hS1">Include Note</a> functionality.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Image files can be embedded into text notes like normal images via
|
||||
<a
|
||||
class="reference-link" href="#root/_help_0Ofbk1aSuVRu">Image references</a>.</p>
|
||||
</li>
|
||||
<li data-list-item-id="e066146c6d5ab67fcd20d634f54a58a66">Non-image files can be embedded into text notes as read-only widgets via
|
||||
the <a class="reference-link" href="#root/_help_nBAXQFj20hS1">Include Note</a> functionality.</li>
|
||||
<li
|
||||
data-list-item-id="eaec442497ed868ee21da4ca456ead455">Image files can be embedded into text notes like normal images via
|
||||
<a
|
||||
class="reference-link" href="#root/_help_0Ofbk1aSuVRu">Image references</a>.</li>
|
||||
</ul>
|
||||
97
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/File/PDFs.html
generated
vendored
97
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/File/PDFs.html
generated
vendored
@ -11,15 +11,9 @@
|
||||
<h2>Storing last position and settings</h2>
|
||||
<p>For every PDF, Trilium will remember the following information:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e800292c222a870700c853355e8f323a3">
|
||||
<p>The current page.</p>
|
||||
</li>
|
||||
<li data-list-item-id="eafe1af464be4b531cc88170014c92cb9">
|
||||
<p>The scroll position, within the current page.</p>
|
||||
</li>
|
||||
<li data-list-item-id="ed9b5e35df1c612b69742ff970c95a25b">
|
||||
<p>The rotation of the page.</p>
|
||||
</li>
|
||||
<li>The current page.</li>
|
||||
<li>The scroll position, within the current page.</li>
|
||||
<li>The rotation of the page.</li>
|
||||
</ul>
|
||||
<p>This makes it useful when reading large documents since the position is
|
||||
remembered automatically. This happens in the background, however it's
|
||||
@ -27,8 +21,8 @@
|
||||
<aside
|
||||
class="admonition tip">
|
||||
<p>Technically, the information about the scroll position and rotation is
|
||||
stored in the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/BFs8mudNFgCS/_help_0vhv7lsOLy82">Attachments</a> section,
|
||||
in a dedicated attachment called <code spellcheck="false">pdfHistory.json</code>.</p>
|
||||
stored in the <a class="reference-link" href="#root/_help_0vhv7lsOLy82">Attachments</a> section,
|
||||
in a dedicated attachment called <code>pdfHistory.json</code>.</p>
|
||||
</aside>
|
||||
<h2>Annotations</h2>
|
||||
<p>Since v0.102.0 it's possible to annotate PDFs. To do so, look for the
|
||||
@ -38,20 +32,20 @@ class="admonition tip">
|
||||
<h3>Supported annotations</h3>
|
||||
<p>The following annotation methods are supported:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e22b0fd64079f222a6edf716d1e287fcd"><strong>Highlight</strong>
|
||||
<li><strong>Highlight</strong>
|
||||
<br>Allows highlighting text with one of the predefined colors.
|
||||
<ul>
|
||||
<li data-list-item-id="ed5816cda369a50d35356545b2e639106">The thickness is also adjustable.</li>
|
||||
<li data-list-item-id="eacd49e75a9b3c6ca88dcc3aecb6e7780">It's also possible to highlight the blank space, turning the feature more
|
||||
<li>The thickness is also adjustable.</li>
|
||||
<li>It's also possible to highlight the blank space, turning the feature more
|
||||
into a thicker pen.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="ed150361858da21a3a043fe273f3a8082"><strong>Text</strong>
|
||||
<li><strong>Text</strong>
|
||||
<br>Allows adding arbitrary text, with a custom color and size.</li>
|
||||
<li data-list-item-id="e1684364a9a848f88610727d8d903113d"><strong>Pen</strong>
|
||||
<li><strong>Pen</strong>
|
||||
<br>Allows free drawing on the document, with variable color, thickness and
|
||||
opacity.</li>
|
||||
<li data-list-item-id="ebff3cc863fa39a4bf69ca9a3a25ed289"><strong>Image</strong>
|
||||
<li><strong>Image</strong>
|
||||
<br>Allows inserting images from outside Trilium directly into the document.</li>
|
||||
</ul>
|
||||
<h3>Editing existing annotations</h3>
|
||||
@ -69,7 +63,7 @@ class="admonition tip">
|
||||
if downloading (for external use outside Trilium) or sharing the note.</p>
|
||||
<p>The downside is that the entire PDF needs to be sent back to the server,
|
||||
which can slow down performance for larger documents. If you encounter
|
||||
any issues from this system, feel free to <a href="#root/pOsGYCXsbNQG/BgmBlOIl72jZ/_help_wy8So3yZZlH9">report it</a>.</p>
|
||||
any issues from this system, feel free to <a href="#root/_help_wy8So3yZZlH9">report it</a>.</p>
|
||||
<h2>Filling out forms</h2>
|
||||
<p>Similar to annotations, forms are also supported by Trilium since v0.102.0.
|
||||
If the document has fields that can be filled-in, they will be indicated
|
||||
@ -77,52 +71,49 @@ class="admonition tip">
|
||||
<p>Simply type text in the forms and they will be automatically saved.</p>
|
||||
<h2>Sidebar navigation</h2>
|
||||
<aside class="admonition note">
|
||||
<p>This feature is only available if <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_IjZS7iK5EXtb">New Layout</a> is
|
||||
<p>This feature is only available if <a class="reference-link" href="#root/_help_IjZS7iK5EXtb">New Layout</a> is
|
||||
enabled. If you are using the old layout, these features are still available
|
||||
by looking for a sidebar button in the PDF viewer toolbar.</p>
|
||||
</aside>
|
||||
<p>When a PDF file is opened in Trilium the <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_RnaPdbciOfeq">Right Sidebar</a> is
|
||||
augmented with PDF-specific navigation, with the following features:</p>
|
||||
href="#root/_help_RnaPdbciOfeq">Right Sidebar</a> is augmented with PDF-specific
|
||||
navigation, with the following features:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="ec98e84135caf286b8c34b65403a7c36b">Table of contents/outline
|
||||
<li>Table of contents/outline
|
||||
<ul>
|
||||
<li data-list-item-id="e3d034433ea04b042c9425d0d183174f0">All the headings and “bookmarks” will be displayed hierarchially.</li>
|
||||
<li
|
||||
data-list-item-id="e6113a5ba02d24a74d858d8b9e5cd529d">The heading on the current page is also highlighted (note that it can
|
||||
<li>All the headings and “bookmarks” will be displayed hierarchially.</li>
|
||||
<li>The heading on the current page is also highlighted (note that it can
|
||||
be slightly offset depending on how many headings are on the same page).</li>
|
||||
<li
|
||||
data-list-item-id="e650d1274d9fcc67a61ed531be41664ba">Clicking on a heading will jump to the corresponding position in the PDF.</li>
|
||||
<li>Clicking on a heading will jump to the corresponding position in the PDF.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="e7596d0db46b52000147e8c58035a9080">Pages
|
||||
<ul>
|
||||
<li data-list-item-id="e878951e72b24d63a5f427c09dbd5b43d">A preview of all the pages with a small thumbnail.</li>
|
||||
<li data-list-item-id="ee2a88c436e666ad03396e16afc5e820d">Clicking on a page will automatically navigate to that page.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="e69b90e09bec99dd22e1d51b3fd47ad30">Attachments
|
||||
<ul>
|
||||
<li data-list-item-id="e32d2f3ca07155778516311955aad6bc1">If the PDF has its own attachments (not to be confused with Trilium's
|
||||
<a
|
||||
class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/BFs8mudNFgCS/_help_0vhv7lsOLy82">Attachments</a>), they will be displayed in a list.</li>
|
||||
<li data-list-item-id="e51eac1ae4ee919989c95a28940f77d1b">Some information such as the name and size of the attachment are displayed.</li>
|
||||
<li
|
||||
data-list-item-id="ee296a4cf55b2d4372496ab8e70691236">It's possible to download the attachment by clicking on the download button.</li>
|
||||
</li>
|
||||
<li>Pages
|
||||
<ul>
|
||||
<li>A preview of all the pages with a small thumbnail.</li>
|
||||
<li>Clicking on a page will automatically navigate to that page.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="ef51c3a38777e3a1a11b7691de57c3eab">Layers
|
||||
<ul>
|
||||
<li data-list-item-id="e09e2c2c5f8fdd0f5756ca6345a275e5d">A less common feature, if the PDF has toggle-able layers, these layers
|
||||
will be displayed in a list here.</li>
|
||||
<li data-list-item-id="e35568c33af1e6bf80f9e5d9c66fa903a">It's possible to toggle the visibility for each individual layer.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
<li>Attachments
|
||||
<ul>
|
||||
<li>If the PDF has its own attachments (not to be confused with Trilium's
|
||||
<a
|
||||
class="reference-link" href="#root/_help_0vhv7lsOLy82">Attachments</a>), they will be displayed in a list.</li>
|
||||
<li>Some information such as the name and size of the attachment are displayed.</li>
|
||||
<li>It's possible to download the attachment by clicking on the download button.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Layers
|
||||
<ul>
|
||||
<li>A less common feature, if the PDF has toggle-able layers, these layers
|
||||
will be displayed in a list here.</li>
|
||||
<li>It's possible to toggle the visibility for each individual layer.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Share functionality</h2>
|
||||
<p>PDFs can also be shared using the <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_R9pX4DGra2Vt">Sharing</a> feature.
|
||||
<p>PDFs can also be shared using the <a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a> feature.
|
||||
This will also use Trilium's customized PDF viewer.</p>
|
||||
<p>If you are using a reverse proxy on your server with strict access limitations
|
||||
for the share functionality, make sure that <code spellcheck="false">[host].com/pdfjs</code> directory
|
||||
is accessible. Note that this directory is outside the <code spellcheck="false">/share</code> route
|
||||
for the share functionality, make sure that <code>[host].com/pdfjs</code> directory
|
||||
is accessible. Note that this directory is outside the <code>/share</code> route
|
||||
as it's common with the rest of the application.</p>
|
||||
43
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html
generated
vendored
43
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html
generated
vendored
@ -7,10 +7,13 @@
|
||||
via an attribute.</p>
|
||||
<h2>Creating a render note</h2>
|
||||
<ol>
|
||||
<li>Create a <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> note
|
||||
with the HTML language, with what needs to be displayed (for example <code><p>Hello world.</p></code>).</li>
|
||||
<li>Create a <a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>.</li>
|
||||
<li>Assign the <code>renderNote</code> <a href="#root/_help_zEY4DaJG4YT5">relation</a> to
|
||||
<li data-list-item-id="ec2f190022b98b67aac4f9de8b4b1bef1">Create a <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> note
|
||||
with the HTML language, with what needs to be displayed (for example
|
||||
<code
|
||||
spellcheck="false"><p>Hello world.</p></code>).</li>
|
||||
<li data-list-item-id="e56aa712548f1ded92180e03ae9e7ecca">Create a <a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>.</li>
|
||||
<li
|
||||
data-list-item-id="e6b459d8d2d99a9fc6f7048711daaa4b1">Assign the <code spellcheck="false">renderNote</code> <a href="#root/_help_zEY4DaJG4YT5">relation</a> to
|
||||
point at the previously created code note.</li>
|
||||
</ol>
|
||||
<h2>Legacy scripting using jQuery</h2>
|
||||
@ -19,14 +22,14 @@
|
||||
change parts of the note using JavaScript.</p>
|
||||
<p>For a simple example, we are going to create a render note that displays
|
||||
the current date in a field.</p>
|
||||
<p>To do so, first create an HTML code note with the following content:</p><pre><code class="language-text-x-trilium-auto"><h1>Current date & time</h1>
|
||||
<p>To do so, first create an HTML code note with the following content:</p><pre><code class="language-text-html"><h1>Current date & time</h1>
|
||||
The current date & time is <span class="date"></span></code></pre>
|
||||
<p>Now we need to add the script. Create another <a class="reference-link"
|
||||
href="#root/_help_6f9hih2hXXZk">Code</a>, but this time of JavaScript (frontend)
|
||||
language. Make sure the newly created note is a direct child of the HTML
|
||||
note created previously; with the following content:</p><pre><code class="language-application-javascript-env-backend">const $dateEl = api.$container.find(".date");
|
||||
$dateEl.text(new Date());</code></pre>
|
||||
<p>Now create a render note at any place and set its <code>~renderNote</code> relation
|
||||
<p>Now create a render note at any place and set its <code spellcheck="false">~renderNote</code> relation
|
||||
to point to the HTML note. When the render note is accessed it will display:</p>
|
||||
<blockquote>
|
||||
<p><strong>Current date & time</strong>
|
||||
@ -39,37 +42,33 @@ $dateEl.text(new Date());</code></pre>
|
||||
need to provide a HTML anymore.</p>
|
||||
<p>Here are the steps to creating a simple render note:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a note of type <a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<li data-list-item-id="e97b7a8c09747533c3af69598a73b11bf">Create a note of type <a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>.</li>
|
||||
<li
|
||||
data-list-item-id="ed2ca441693dbfddabdbf31002561bff3">
|
||||
<p>Create a child <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> note
|
||||
with JSX as the language.
|
||||
<br>As an example, use the following content:</p><pre><code class="language-text-x-trilium-auto">export default function() {
|
||||
<br>As an example, use the following content:</p><pre><code class="language-text-jsx">export default function() {
|
||||
return (
|
||||
<>
|
||||
<p>Hello world.</p>
|
||||
</>
|
||||
);
|
||||
}</code></pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>In the parent render note, define a <code>~renderNote</code> relation pointing
|
||||
to the newly created child.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Refresh the render note and it should display a “Hello world” message.</p>
|
||||
</li>
|
||||
</li>
|
||||
<li data-list-item-id="e73d4282cfed4df57b66632aba026aa19">In the parent render note, define a <code spellcheck="false">~renderNote</code> relation
|
||||
pointing to the newly created child.</li>
|
||||
<li data-list-item-id="e601de50cd951faef6d1987431089058c">Refresh the render note and it should display a “Hello world” message.</li>
|
||||
</ol>
|
||||
<h2>Refreshing the note</h2>
|
||||
<p>It's possible to refresh the note via:</p>
|
||||
<ul>
|
||||
<li>The corresponding button in <a class="reference-link" href="#root/_help_XpOYSgsLkTJy">Floating buttons</a>.</li>
|
||||
<li>The “Render active note” <a href="#root/_help_A9Oc6YKKc65v">keyboard shortcut</a> (not
|
||||
<li data-list-item-id="e01a9786381e31e763afa31b2b9aa878c">The corresponding button in <a class="reference-link" href="#root/_help_XpOYSgsLkTJy">Floating buttons</a>.</li>
|
||||
<li
|
||||
data-list-item-id="e88aa1485ccd215847cb0e3950c0efa08">The “Render active note” <a href="#root/_help_A9Oc6YKKc65v">keyboard shortcut</a> (not
|
||||
assigned by default).</li>
|
||||
</ul>
|
||||
<h2>Examples</h2>
|
||||
<ul>
|
||||
<li><a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a> which
|
||||
<li data-list-item-id="e8af6ea28ee52401bb78113fe1d82f1dc"><a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a> which
|
||||
is present in the <a class="reference-link" href="#root/_help_6tZeKvSHEUiB">Demo Notes</a>.</li>
|
||||
</ul>
|
||||
@ -2,9 +2,9 @@
|
||||
support for JSX.</p>
|
||||
<p>Preact can be used for:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e5c224943359315528b8eb20e0e16bf02"><a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>, where
|
||||
<li><a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>, where
|
||||
a JSX code note is used instead of a HTML one.</li>
|
||||
<li data-list-item-id="eccf375685d8f35e66c9e62619f013b60"><a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>,
|
||||
<li><a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>,
|
||||
where JSX can be used to replace the old, jQuery-based mechanism.</li>
|
||||
</ul>
|
||||
<p>To get started, the first step is to enable JSX in the list of Code languages.
|
||||
@ -20,10 +20,9 @@
|
||||
</aside>
|
||||
<h2>Import/exports</h2>
|
||||
<p>When using Preact with JSX, there is a special syntax which provides ES-like
|
||||
imports. This <code spellcheck="false">import</code> syntax makes way for
|
||||
a more intuitive that doesn't make use of global objects and paves the
|
||||
way for better auto-completion support that might be introduced in the
|
||||
future. </p>
|
||||
imports. This <code>import</code> syntax makes way for a more intuitive that
|
||||
doesn't make use of global objects and paves the way for better auto-completion
|
||||
support that might be introduced in the future. </p>
|
||||
<h3>API imports</h3>
|
||||
<p>Instead of:</p><pre><code class="language-text-jsx">api.showMessage("Hello");</code></pre>
|
||||
<p>the JSX version looks like this:</p><pre><code class="language-text-jsx">import { showMessage } from "trilium:api";
|
||||
@ -44,15 +43,13 @@ const [ myState, setMyState ] = useState("Hi");</code></pre>
|
||||
);
|
||||
}</code></pre>
|
||||
<h3>Import/export are not required</h3>
|
||||
<p>These imports are syntactic sugar meant to replace the usage for the
|
||||
<code
|
||||
spellcheck="false">api</code>global object (see <a class="reference-link" href="#root/_help_GLks18SNjxmC">Script API</a>). </p>
|
||||
<p>These imports are syntactic sugar meant to replace the usage for the <code>api</code> global
|
||||
object (see <a class="reference-link" href="#root/_help_GLks18SNjxmC">Script API</a>). </p>
|
||||
<aside
|
||||
class="admonition note">
|
||||
<p>The <code spellcheck="false">import</code> and <code spellcheck="false">export</code> syntax
|
||||
work only for JSX notes. Standard/jQuery code notes still need to use the
|
||||
<code
|
||||
spellcheck="false">api</code>global and <code spellcheck="false">module.exports</code>.</p>
|
||||
<p>The <code>import</code> and <code>export</code> syntax work only for JSX notes.
|
||||
Standard/jQuery code notes still need to use the <code>api</code> global
|
||||
and <code>module.exports</code>.</p>
|
||||
</aside>
|
||||
<h2>Under the hood</h2>
|
||||
<p>Unlike JavaScript, JSX requires pre-processing to turn it into JavaScript
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
also available to <a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a> and
|
||||
<a
|
||||
class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>.</p>
|
||||
<p>To use these components, simply import them from <code spellcheck="false">trilium:preact</code>:</p><pre><code class="language-text-jsx">import { ActionButton, Button, LinkButton } from "trilium:preact";</code></pre>
|
||||
<p>To use these components, simply import them from <code>trilium:preact</code>:</p><pre><code class="language-text-jsx">import { ActionButton, Button, LinkButton } from "trilium:preact";</code></pre>
|
||||
<p>and then use them:</p><pre><code class="language-text-jsx">export default function MyRenderNote() {
|
||||
const onClick = () => showMessage("A button was pressed");
|
||||
|
||||
@ -33,12 +33,12 @@
|
||||
to custom widgets and JSX render notes.</p>
|
||||
<p>To use it, simply:</p>
|
||||
<ol>
|
||||
<li data-list-item-id="e201c26633c3655e16c1408da3d277352">Create a render note.</li>
|
||||
<li data-list-item-id="e45bace7ccf33bec8fbe7103e28e21c7f">Create a child code note of JSX type with the content of this file:
|
||||
<li>Create a render note.</li>
|
||||
<li>Create a child code note of JSX type with the content of this file:
|
||||
<a
|
||||
class="reference-link" href="#root/_help_i9B4IW7b6V6z">Widget showcase</a>
|
||||
</li>
|
||||
<li data-list-item-id="e35635c3e08829316c6a1b68b80ff8ebd">Set the <code spellcheck="false">~renderNote</code> relation of the parent
|
||||
note to the child note.</li>
|
||||
<li data-list-item-id="edd02eaa6bb298854826ae5c7cd2d32d3">Refresh the render note to see the results.</li>
|
||||
<li>Set the <code>~renderNote</code> relation of the parent note to the child
|
||||
note.</li>
|
||||
<li>Refresh the render note to see the results.</li>
|
||||
</ol>
|
||||
@ -9,4 +9,4 @@
|
||||
<h2>Custom CSS file</h2>
|
||||
<p>Simply create a <a class="reference-link" href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>.
|
||||
Make sure the class names are unique enough to not intersect with other
|
||||
UI elements, consider adding a prefix (e.g. <code spellcheck="false">x-mywidget-</code>).</p>
|
||||
UI elements, consider adding a prefix (e.g. <code>x-mywidget-</code>).</p>
|
||||
@ -6,21 +6,21 @@
|
||||
<p>Here's an example child hierarchy using <a class="reference-link"
|
||||
href="#root/_help_HcABDtFCkbFN">Render Note</a>: </p>
|
||||
<ul>
|
||||
<li><em>My render note</em>
|
||||
<li data-list-item-id="e498ad62c68e67a4f6b3b3b9d50156748"><em>My render note</em>
|
||||
<br>Note type: Render Note
|
||||
<br>Link <code>~renderNote</code> to the child note (<em>Render note with subcomponents</em>)
|
||||
<br>Link <code spellcheck="false">~renderNote</code> to the child note (<em>Render note with subcomponents</em>)
|
||||
<ul>
|
||||
<li>
|
||||
<li data-list-item-id="e2b43e3b03e00467bb376a0a5d619740e">
|
||||
<p><em>Render note with subcomponents</em>
|
||||
<br>Type: JSX</p><pre><code class="language-application-javascript-env-backend">export default function() {
|
||||
<br>Type: JSX</p><pre><code class="language-text-jsx">export default function() {
|
||||
return (
|
||||
<MyComponent />
|
||||
);
|
||||
}</code></pre>
|
||||
<ul>
|
||||
<li>
|
||||
<li data-list-item-id="ec6ea351355db20b5117c2460794bbf56">
|
||||
<p><em>MyComponent</em>
|
||||
<br>Type: Code / JSX</p><pre><code class="language-application-javascript-env-backend">export default function MyComponent() {
|
||||
<br>Type: Code / JSX</p><pre><code class="language-text-jsx">export default function MyComponent() {
|
||||
return <p>Hi</p>;
|
||||
}</code></pre>
|
||||
</li>
|
||||
@ -30,16 +30,17 @@
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Multiple components per note</h2>
|
||||
<p>To export multiple components, use the <code>export</code> keyword next
|
||||
to each of the function components.</p>
|
||||
<p>Here's how a sub-note called <code>MyComponents</code> would look like:</p><pre><code class="language-application-javascript-env-backend">export function MyFirstComponent() {
|
||||
<p>To export multiple components, use the <code spellcheck="false">export</code> keyword
|
||||
next to each of the function components.</p>
|
||||
<p>Here's how a sub-note called <code spellcheck="false">MyComponents</code> would
|
||||
look like:</p><pre><code class="language-text-jsx">export function MyFirstComponent() {
|
||||
return <p>First</p>;
|
||||
}
|
||||
|
||||
export function MySecondComponent() {
|
||||
return <p>Bar</p>;
|
||||
}</code></pre>
|
||||
<p>Then in its parent note:</p><pre><code class="language-application-javascript-env-backend">const { MyFirstComponent, MySecondComponent } = MyComponents;
|
||||
<p>Then in its parent note:</p><pre><code class="language-text-jsx">const { MyFirstComponent, MySecondComponent } = MyComponents;
|
||||
|
||||
export default function() {
|
||||
return (
|
||||
@ -50,5 +51,5 @@ export default function() {
|
||||
);
|
||||
}</code></pre>
|
||||
<p>Alternatively, it's also possible to use the components directly without
|
||||
assigning them to a <code>const</code> first:</p><pre><code class="language-application-javascript-env-backend"><MyComponents.MyFirstComponent />
|
||||
assigning them to a <code spellcheck="false">const</code> first:</p><pre><code class="language-text-jsx"><MyComponents.MyFirstComponent />
|
||||
<MyComponents.MySecondComponent /></code></pre>
|
||||
@ -1,14 +1,14 @@
|
||||
<h2>Standard Preact hooks</h2>
|
||||
<p>All standard Preact hooks are available as an import in <code>trilium:api</code>.</p>
|
||||
<p>For example:</p><pre><code class="language-text-x-trilium-auto">import { useState } from "trilium:preact";
|
||||
<p>All standard Preact hooks are available as an import in <code spellcheck="false">trilium:api</code>.</p>
|
||||
<p>For example:</p><pre><code class="language-text-jsx">import { useState } from "trilium:preact";
|
||||
const [ myState, setMyState ] = useState("Hi");</code></pre>
|
||||
<h2>Custom hooks</h2>
|
||||
<p>Trilium comes with a large set of custom hooks for Preact, all of which
|
||||
are also available to custom widgets and <a class="reference-link"
|
||||
href="#root/_help_HcABDtFCkbFN">Render Note</a>.</p>
|
||||
<h3><code>useNoteContext</code></h3>
|
||||
<h3><code spellcheck="false">useNoteContext</code></h3>
|
||||
<p>As a replacement to <a class="reference-link" href="#root/_help_GhurYZjh8e1V">Note context aware widget</a>,
|
||||
Preact exposes the current note context in the <code>useNoteContext</code> hook:</p><pre><code class="language-text-x-trilium-auto">import { defineWidget, useNoteContext, useNoteProperty } from "trilium:preact";
|
||||
Preact exposes the current note context in the <code spellcheck="false">useNoteContext</code> hook:</p><pre><code class="language-text-jsx">import { defineWidget, useNoteContext, useNoteProperty } from "trilium:preact";
|
||||
|
||||
export default defineWidget({
|
||||
parent: "note-detail-pane",
|
||||
@ -21,13 +21,15 @@ export default defineWidget({
|
||||
});</code></pre>
|
||||
<p>Note that the custom widget must be inside the content area (so note detail
|
||||
widget) for this to work properly, especially when dealing with splits.</p>
|
||||
<h3><code>useActiveNoteContext</code></h3>
|
||||
<p><code>useActiveNoteContext</code> is an alternative to <code>useNoteContext</code> which
|
||||
works even if the widget is not within the note detail section and it automatically
|
||||
switches the note context as the user is navigating around between tabs
|
||||
and splits.</p>
|
||||
<h3><code>useNoteProperty</code></h3>
|
||||
<p>This hook allows “listening” for changes to a particular property of a <code>FNote</code>,
|
||||
such as the <code>title</code> or <code>type</code> of a note. The benefit
|
||||
from using the hook is that it actually reacts to changes, for example
|
||||
if the note title or type is changed.</p>
|
||||
<h3><code spellcheck="false">useActiveNoteContext</code></h3>
|
||||
<p><code spellcheck="false">useActiveNoteContext</code> is an alternative
|
||||
to <code spellcheck="false">useNoteContext</code> which works even if the
|
||||
widget is not within the note detail section and it automatically switches
|
||||
the note context as the user is navigating around between tabs and splits.</p>
|
||||
<h3><code spellcheck="false">useNoteProperty</code></h3>
|
||||
<p>This hook allows “listening” for changes to a particular property of a
|
||||
<code
|
||||
spellcheck="false">FNote</code>, such as the <code spellcheck="false">title</code> or
|
||||
<code
|
||||
spellcheck="false">type</code>of a note. The benefit from using the hook is that it actually
|
||||
reacts to changes, for example if the note title or type is changed.</p>
|
||||
@ -1,5 +1,5 @@
|
||||
# Documentation
|
||||
There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/v280Ba21YUiA/Documentation_image.png" width="205" height="162">
|
||||
There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/ywZE36YO8YGQ/Documentation_image.png" width="205" height="162">
|
||||
|
||||
* The _User Guide_ represents the user-facing documentation. This documentation can be browsed by users directly from within Trilium, by pressing <kbd>F1</kbd>.
|
||||
* The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers.
|
||||
|
||||
4
docs/User Guide/User Guide/FAQ.md
vendored
4
docs/User Guide/User Guide/FAQ.md
vendored
@ -32,7 +32,7 @@ Common request is to allow multiple users collaborate, share notes etc. So far I
|
||||
|
||||
This is normally not supported - one Trilium process can open only a single instance of a [database](Advanced%20Usage/Database.md). However, you can run two Trilium processes (from one installation), each connected to a separate document. To achieve this, you need to set a location for the [data directory](Installation%20%26%20Setup/Data%20directory.md) in the `TRILIUM_DATA_DIR` environment variable and separate port on `TRILIUM_PORT` environment variable. How to do that depends on the platform, in Unix-based systems you can achieve that by running command such as this:
|
||||
|
||||
```
|
||||
```sh
|
||||
TRILIUM_DATA_DIR=/home/me/path/to/data/dir TRILIUM_PORT=12345 trilium
|
||||
```
|
||||
|
||||
@ -44,7 +44,7 @@ No.
|
||||
|
||||
These general purpose sync apps are not suitable to sync database files which are open and being worked on by another application. The result is that they will corrupt the database file, resulting in data loss and this message in the Trilium logs:
|
||||
|
||||
```
|
||||
```plain
|
||||
SqliteError: database disk image is malformed
|
||||
```
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ For a simple example, we are going to create a render note that displays the cur
|
||||
|
||||
To do so, first create an HTML code note with the following content:
|
||||
|
||||
```
|
||||
```html
|
||||
<h1>Current date & time</h1>
|
||||
The current date & time is <span class="date"></span>
|
||||
```
|
||||
@ -44,7 +44,7 @@ Here are the steps to creating a simple render note:
|
||||
2. Create a child <a class="reference-link" href="Code.md">Code</a> note with JSX as the language.
|
||||
As an example, use the following content:
|
||||
|
||||
```
|
||||
```jsx
|
||||
export default function() {
|
||||
return (
|
||||
<>
|
||||
|
||||
@ -13,7 +13,7 @@ Here's an example child hierarchy using <a class="reference-link" href="../../.
|
||||
* _Render note with subcomponents_
|
||||
Type: JSX
|
||||
|
||||
```javascript
|
||||
```jsx
|
||||
export default function() {
|
||||
return (
|
||||
<MyComponent />
|
||||
@ -24,7 +24,7 @@ Here's an example child hierarchy using <a class="reference-link" href="../../.
|
||||
* _MyComponent_
|
||||
Type: Code / JSX
|
||||
|
||||
```javascript
|
||||
```jsx
|
||||
export default function MyComponent() {
|
||||
return <p>Hi</p>;
|
||||
}
|
||||
@ -36,7 +36,7 @@ To export multiple components, use the `export` keyword next to each of the func
|
||||
|
||||
Here's how a sub-note called `MyComponents` would look like:
|
||||
|
||||
```javascript
|
||||
```jsx
|
||||
export function MyFirstComponent() {
|
||||
return <p>First</p>;
|
||||
}
|
||||
@ -48,7 +48,7 @@ export function MySecondComponent() {
|
||||
|
||||
Then in its parent note:
|
||||
|
||||
```javascript
|
||||
```jsx
|
||||
const { MyFirstComponent, MySecondComponent } = MyComponents;
|
||||
|
||||
export default function() {
|
||||
@ -63,7 +63,7 @@ export default function() {
|
||||
|
||||
Alternatively, it's also possible to use the components directly without assigning them to a `const` first:
|
||||
|
||||
```javascript
|
||||
```jsx
|
||||
<MyComponents.MyFirstComponent />
|
||||
<MyComponents.MySecondComponent />
|
||||
```
|
||||
@ -5,7 +5,7 @@ All standard Preact hooks are available as an import in `trilium:api`.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
```jsx
|
||||
import { useState } from "trilium:preact";
|
||||
const [ myState, setMyState ] = useState("Hi");
|
||||
```
|
||||
@ -18,7 +18,7 @@ Trilium comes with a large set of custom hooks for Preact, all of which are also
|
||||
|
||||
As a replacement to <a class="reference-link" href="../Custom%20Widgets/Note%20context%20aware%20widget.md">Note context aware widget</a>, Preact exposes the current note context in the `useNoteContext` hook:
|
||||
|
||||
```
|
||||
```jsx
|
||||
import { defineWidget, useNoteContext, useNoteProperty } from "trilium:preact";
|
||||
|
||||
export default defineWidget({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user