mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
docs(guide): improve and update supported syntax for Markdown import
This commit is contained in:
2
apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json
generated
vendored
2
apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json
generated
vendored
File diff suppressed because one or more lines are too long
@@ -42,19 +42,5 @@
|
||||
This will export the notes in an unencrypted form, so if you reimport into
|
||||
Trilium, make sure to re-protect these notes.</p>
|
||||
<h2>Supported syntax</h2>
|
||||
<ul>
|
||||
<li><a href="https://github.github.com/gfm/">GitHub-Flavored Markdown</a> is
|
||||
the main syntax that Trilium is following.</li>
|
||||
<li>Images are supported. When exporting, images are usually kept in the basic
|
||||
Markdown syntax but will use the HTML syntax if the image has a custom
|
||||
width. Figures are always embedded as HTML.</li>
|
||||
<li>Tables are supported with the Markdown syntax. If the table is too complex
|
||||
or contains elements that would render as HTML, the table is also rendered
|
||||
as HTML.</li>
|
||||
<li><a class="reference-link" href="#root/_help_NwBbFdNZ9h7O">Admonitions</a> are
|
||||
supported using GitHub's format.</li>
|
||||
<li>Links are supported. “Reference links” (internal links that mirror a note's
|
||||
title and display its icon) are embedded as HTML in order to preserve the
|
||||
information on import.</li>
|
||||
<li>Math equations are supported using <code>$</code> and <code>$$</code> syntaxes.</li>
|
||||
</ul>
|
||||
<p>See the dedicated page: <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/mHbBMPDPkVV5/Oau6X9rCuegd/_help_rJ9grSgoExl9">Supported syntax</a>
|
||||
</p>
|
||||
54
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown/Supported syntax.html
generated
vendored
Normal file
54
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown/Supported syntax.html
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<p><a href="https://github.github.com/gfm/">GitHub-Flavored Markdown</a> is
|
||||
the main syntax that Trilium is following.</p>
|
||||
<h2>Images</h2>
|
||||
<p>When exporting, images are usually kept in the basic Markdown syntax but
|
||||
will use the HTML syntax if the image has a custom width. Figures are always
|
||||
embedded as HTML.</p>
|
||||
<h2>Tables</h2>
|
||||
<p>Simple tables are supported with the Markdown syntax. If the table is
|
||||
too complex or contains elements that would render as HTML, the table is
|
||||
also rendered as HTML.</p>
|
||||
<h2>Links</h2>
|
||||
<p>Standard Markdown links are supported.</p>
|
||||
<p>Trilium internal links (that mirror a note's title and display its icon)
|
||||
are embedded as HTML in order to preserve the information on import.</p>
|
||||
<h2>Math equations</h2>
|
||||
<p>Both inline and display equations are supported, using the <code>$</code> and <code>$$</code> syntaxes.</p>
|
||||
<h2>Admonitions</h2>
|
||||
<p>The Markdown syntax for admonitions as supported by Trilium is the one
|
||||
that GitHub uses, which is as follows:</p><pre><code class="language-text-x-trilium-auto">> [!NOTE]
|
||||
> This is a note.
|
||||
|
||||
> [!TIP]
|
||||
> This is a tip.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This is a very important information.
|
||||
|
||||
> [!CAUTION]
|
||||
> This is a caution.</code></pre>
|
||||
<p>There are currently no plans of supporting alternative admonition syntaxes
|
||||
such as <code>!!! note</code>.</p>
|
||||
<h2>Wikilinks</h2>
|
||||
<p>Basic support for wikilinks has been added in v0.96.0:</p>
|
||||
<ul>
|
||||
<li><code>[[foo/bar]]</code> will look for the <code>bar.md</code> file in the <code>foo</code> directory
|
||||
and turn it into an internal link.</li>
|
||||
<li><code>![[foo/baz.png]]</code> will look for the <code>baz.png</code> file
|
||||
in the <code>foo</code> directory and turn it into an image.</li>
|
||||
</ul>
|
||||
<p>This feature is import-only, which means that it will turn wikilinks into
|
||||
Trilium-compatible syntax, but it will not export Trilium Notes into Markdown
|
||||
files with this syntax.</p>
|
||||
<aside class="admonition important">
|
||||
<p>The path to pages in wikilinks is resolved relatively to the <em>import root </em>and
|
||||
not the current directory of the note. This is to be inline with other
|
||||
platforms that use wikilinks such as SilverBullet.</p>
|
||||
<p>The root path of the import is determined as follows:</p>
|
||||
<ul>
|
||||
<li>If there is a single directory within the archive at root level, then
|
||||
that directory is considered the root.</li>
|
||||
<li>If there are multiple files & directories at root level, then the
|
||||
archive root (containing all of these items) is considered the root.</li>
|
||||
</ul>
|
||||
</aside>
|
||||
9
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text.html
generated
vendored
9
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text.html
generated
vendored
@@ -153,13 +153,13 @@ class="table">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/_help_gLt3vA97tMcp">Premium features</a>
|
||||
<td><a class="reference-link" href="#root/_help_gLt3vA97tMcp">Premium features</a>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/gLt3vA97tMcp/_help_ZlN4nump6EbW">Slash Commands</a>
|
||||
<li><a class="reference-link" href="#root/_help_ZlN4nump6EbW">Slash Commands</a>
|
||||
</li>
|
||||
<li><a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_KC1HB96bqqHX">Templates</a>
|
||||
<li><a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
@@ -167,7 +167,8 @@ class="table">
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<h2>Read-Only vs. Editing Mode</h2>
|
||||
|
||||
<h2>Read-Only vs. Editing Mode</h2>
|
||||
<p>Text notes are usually opened in edit mode. However, they may open in
|
||||
read-only mode if the note is too big or the note is explicitly marked
|
||||
as read-only. For more information, see <a class="reference-link"
|
||||
|
||||
@@ -62,17 +62,4 @@ class="image image-style-align-center">
|
||||
are currently no plans for adjusting it or allowing the user to customize
|
||||
them.</p>
|
||||
<h3>Markdown support</h3>
|
||||
<p>The Markdown syntax for admonitions as supported by Trilium is the one
|
||||
that GitHub uses, which is as follows:</p><pre><code class="language-text-x-trilium-auto">> [!NOTE]
|
||||
> This is a note.
|
||||
|
||||
> [!TIP]
|
||||
> This is a tip.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This is a very important information.
|
||||
|
||||
> [!CAUTION]
|
||||
> This is a caution.</code></pre>
|
||||
<p>There are currently no plans of supporting alternative admonition syntaxes
|
||||
such as <code>!!! note</code>.</p>
|
||||
<p>See <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/mHbBMPDPkVV5/Oau6X9rCuegd/_help_rJ9grSgoExl9">Supported syntax</a>.</p>
|
||||
@@ -1,17 +1,18 @@
|
||||
<p>The text editor we are using for <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_iPIMuisry3hd">Text</a> notes
|
||||
<p>The text editor we are using for <a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a> notes
|
||||
is called CKEditor and it's a commercial product. The core components are
|
||||
open-source, however they <a href="https://ckeditor.com/docs/trial/latest/index.html">offer quite a few features</a> that
|
||||
require a commercial license in order to be used.</p>
|
||||
<p>We have reached out to the CKEditor team in order to obtain a license
|
||||
in order to have some of these extra features and they have agreed, based
|
||||
on a signed agreement.</p>
|
||||
<h2>How the license works</h2>
|
||||
|
||||
<h2>How the license works</h2>
|
||||
<p>The license key is stored in the application and it enables the use of
|
||||
the previously described premium features. The license key has an expiration
|
||||
date which means that the features can become disabled if using an older
|
||||
version of the application for extended periods of time.</p>
|
||||
<h2>Can I opt out of these features?</h2>
|
||||
|
||||
<p>At this moment there is no way to disable this features, apart from manually
|
||||
modifying the source code. If this is a problem, <a href="#root/pOsGYCXsbNQG/BgmBlOIl72jZ/_help_wy8So3yZZlH9">let us know</a>.</p>
|
||||
<h2>Can I opt out of these features?</h2>
|
||||
<p>At this moment there is no way to disable these features, apart from manually
|
||||
modifying the source code. If this is a problem, <a href="#root/_help_wy8So3yZZlH9">let us know</a>.</p>
|
||||
<p>If you have the possibility of rebuilding the source code (e.g. if a package
|
||||
maintainer), then modify <code>VITE_CKEDITOR_KEY</code> in <code>apps/client/.env</code> to
|
||||
be <code>GPL</code>.</p>
|
||||
@@ -1,18 +1,18 @@
|
||||
<figure class="image image-style-align-right">
|
||||
<img style="aspect-ratio:419/571" src="Slash Commands_image.png" width="419"
|
||||
height="571" />
|
||||
<img style="aspect-ratio:419/571;" src="Slash Commands_image.png" width="419"
|
||||
height="571">
|
||||
</figure>
|
||||
<aside class="admonition note">
|
||||
<p>This is a premium feature of the editor we are using (CKEditor) and we
|
||||
benefit from it thanks to an written agreement with the team. See <a class="reference-link"
|
||||
href="#root/_help_gLt3vA97tMcp">Premium features</a> for more information.</p>
|
||||
benefit from it thanks to an written agreement with the team. See
|
||||
<a
|
||||
class="reference-link" href="#root/_help_gLt3vA97tMcp">Premium features</a> for more information.</p>
|
||||
</aside>
|
||||
<p>Slash commands is a feature of <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_iPIMuisry3hd">Text</a> notes
|
||||
<p>Slash commands is a feature of <a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a> notes
|
||||
which allows easily accessing commonly used commands simply by using the
|
||||
keyboard, without having to remember dedicated <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/_help_A9Oc6YKKc65v">Keyboard Shortcuts</a>.</p>
|
||||
<h2>Interaction</h2>
|
||||
|
||||
keyboard, without having to remember dedicated <a class="reference-link"
|
||||
href="#root/_help_A9Oc6YKKc65v">Keyboard Shortcuts</a>.</p>
|
||||
<h2>Interaction</h2>
|
||||
<ul>
|
||||
<li>As the name suggests, to trigger the slash commands simply press the <kbd>/</kbd> key
|
||||
to trigger it. Note that this can be anywhere in a paragraph as long as
|
||||
@@ -23,13 +23,12 @@
|
||||
<li>To search by title or description, simply start typing for an action.</li>
|
||||
<li>To trigger an action, press the <kbd>Enter</kbd> key.</li>
|
||||
</ul>
|
||||
<h2>Integration with other features</h2>
|
||||
|
||||
<h2>Integration with other features</h2>
|
||||
<p>Apart from the common set of commands, some features are specially integrated
|
||||
with the slash commands:</p>
|
||||
<ul>
|
||||
<li>For <a href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/_help_NwBbFdNZ9h7O">admonitions</a>,
|
||||
each admonition type (e.g. note, tip) will be individually displayed.</li>
|
||||
<li>Every <a class="reference-link" href="#root/_help_pwc194wlRzcH">Text Snippets</a> will
|
||||
<li>For <a href="#root/_help_NwBbFdNZ9h7O">admonitions</a>, each admonition
|
||||
type (e.g. note, tip) will be individually displayed.</li>
|
||||
<li>Every <a class="reference-link" href="#root/_help_pwc194wlRzcH">Text Snippets</a> will
|
||||
also appear individually, making it easy to insert them.</li>
|
||||
</ul>
|
||||
@@ -1,18 +1,18 @@
|
||||
<figure class="image image-style-align-right">
|
||||
<img style="aspect-ratio:265/108" src="Text Snippets_image.png" width="265"
|
||||
height="108" />
|
||||
<img style="aspect-ratio:265/108;" src="Text Snippets_image.png" width="265"
|
||||
height="108">
|
||||
</figure>
|
||||
<aside class="admonition note">
|
||||
<p>This is a premium feature of the editor we are using (CKEditor) and we
|
||||
benefit from it thanks to an written agreement with the team. See <a class="reference-link"
|
||||
href="#root/_help_gLt3vA97tMcp">Premium features</a> for more information.</p>
|
||||
benefit from it thanks to an written agreement with the team. See
|
||||
<a
|
||||
class="reference-link" href="#root/_help_gLt3vA97tMcp">Premium features</a> for more information.</p>
|
||||
</aside>
|
||||
<p>Text Snippets are closely related to <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_KC1HB96bqqHX">Templates</a>,
|
||||
<p>Text Snippets are closely related to <a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>,
|
||||
but instead of defining the content of an entire note, text snippets are
|
||||
pieces of formatted text that can easily be inserted in a text note.</p>
|
||||
<h2>Creating a text snippet</h2>
|
||||
|
||||
<p>In the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_oPVyFC7WL2Lp">Note Tree</a>: </p>
|
||||
<h2>Creating a text snippet</h2>
|
||||
<p>In the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>: </p>
|
||||
<ol>
|
||||
<li>Right click a note where to place the text snippet.</li>
|
||||
<li>Select <em>Insert child note</em>.</li>
|
||||
@@ -21,16 +21,14 @@
|
||||
<p>Afterwards, simply type in the content of the note the desired text. The
|
||||
text can be formatted in the same manner as a normal text note.</p>
|
||||
<p>The title of the note will become the title of the template. Optionally,
|
||||
a description can be added in the <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a> section.</p>
|
||||
<h2>Inserting a snippet</h2>
|
||||
|
||||
a description can be added in the <a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a> section.</p>
|
||||
<h2>Inserting a snippet</h2>
|
||||
<p>Once a snippet is created, there are two options to insert it:</p>
|
||||
<ol>
|
||||
<li>From the <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/_help_nRhnJkTT8cPs">Formatting toolbar</a>,
|
||||
<li>From the <a class="reference-link" href="#root/_help_nRhnJkTT8cPs">Formatting toolbar</a>,
|
||||
by looking for the
|
||||
<img src="1_Text Snippets_image.png" width="19" height="19"
|
||||
/>button.</li>
|
||||
<li>Using <a class="reference-link" href="#root/_help_ZlN4nump6EbW">Slash Commands</a>:
|
||||
<img src="1_Text Snippets_image.png" width="19" height="19">button.</li>
|
||||
<li>Using <a class="reference-link" href="#root/_help_ZlN4nump6EbW">Slash Commands</a>:
|
||||
<ol>
|
||||
<li>To look for a specific template, start typing the name of the template
|
||||
(its title).</li>
|
||||
@@ -41,16 +39,15 @@
|
||||
<aside class="admonition tip">
|
||||
<p>A newly created snippet doesn't appear? Generally it takes up to a few
|
||||
seconds to refresh the list of templates once you make a change.</p>
|
||||
<p>If this doesn't happen, <a href="#root/pOsGYCXsbNQG/BgmBlOIl72jZ/_help_s8alTXmpFR61">reload the application</a> and
|
||||
<p>If this doesn't happen, <a href="#root/_help_s8alTXmpFR61">reload the application</a> and
|
||||
<a
|
||||
href="#root/pOsGYCXsbNQG/BgmBlOIl72jZ/_help_wy8So3yZZlH9">report the issue</a>to us. </p>
|
||||
href="#root/_help_wy8So3yZZlH9">report the issue</a>to us. </p>
|
||||
</aside>
|
||||
<h2>Limitations</h2>
|
||||
|
||||
<h2>Limitations</h2>
|
||||
<ul>
|
||||
<li>Whenever a snippet is created, deleted or its title/description are modified,
|
||||
all the open text notes will need to be refreshed. This causes a slight
|
||||
flash for usually under a second, but it can cause some discomfort.</li>
|
||||
<li>Unlike <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_KC1HB96bqqHX">Templates</a>,
|
||||
the snippets cannot be limited to a particular <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/wArbEsdSae6g/_help_9sRHySam5fXb">workspace</a>.</li>
|
||||
<li>Unlike <a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>,
|
||||
the snippets cannot be limited to a particular <a href="#root/_help_9sRHySam5fXb">workspace</a>.</li>
|
||||
</ul>
|
||||
Reference in New Issue
Block a user