mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 09:17:35 +02:00
docs: add more details to Markdown note type
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
31
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note types with split view.html
generated
vendored
Normal file
31
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note types with split view.html
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<p>Split view is a feature of <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_s1aBHPd79XYj">Mermaid Diagrams</a> and
|
||||
<a
|
||||
class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_6RM1Q7ppFVoj">Markdown</a> notes which displays both the source code on one side
|
||||
and the preview of the content on the other.</p>
|
||||
<p><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_s1aBHPd79XYj">Mermaid Diagrams</a> also
|
||||
allow changing between a horizontal or a vertical split, to accommodate
|
||||
for the various sizes of diagrams.</p>
|
||||
<h2>Display modes and interaction</h2>
|
||||
<p>The split comes with three different display modes:</p>
|
||||
<ul>
|
||||
<li><em>Split view</em>, in which both the source code is available on one
|
||||
side and can be edited, and the preview is available on the other side.
|
||||
<ul>
|
||||
<li>In this mode, the size of either the source pane or the preview pane can
|
||||
be adjusted by dragging the small border between them.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><em>Source view</em> which shows the source code on the entire screen for
|
||||
a more focused editing experience.</li>
|
||||
<li><em>Preview</em> which displays only the rendering of the diagram or text
|
||||
in full screen, especially useful for read-only notes.</li>
|
||||
</ul>
|
||||
<p>These buttons can be found near the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_8YBEPzcpUgxw">Note buttons</a> section
|
||||
on the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_IjZS7iK5EXtb">New Layout</a>,
|
||||
or in the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_XpOYSgsLkTJy">Floating buttons</a> on
|
||||
the old layout.</p>
|
||||
<p>The display node is stored at note level.</p>
|
||||
<h2>Relation to read-only notes</h2>
|
||||
<p>If a note is marked as <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/BFs8mudNFgCS/_help_CoFPLs3dRlXc">read-only</a>,
|
||||
the source view will not be editable. While in preview mode, marking a
|
||||
note as read-only has no effect since the preview itself is not editable.</p>
|
||||
37
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/File.html
generated
vendored
37
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/File.html
generated
vendored
@@ -5,7 +5,8 @@
|
||||
create a <em>File</em> note type directly:</p>
|
||||
<ul>
|
||||
<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
|
||||
<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>
|
||||
@@ -82,28 +83,30 @@
|
||||
href="#root/_help_BlN9DFI679QC">Ribbon</a>.
|
||||
<ul>
|
||||
<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>
|
||||
<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>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>
|
||||
</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>
|
||||
<p>Files are also displayed in the <a class="reference-link" href="#root/_help_0ESUbbAxVnoK">Note List</a> based
|
||||
on their type:</p>
|
||||
<img class="image_resized" style="aspect-ratio:853/315;width:50%;"
|
||||
src="4_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>
|
||||
<p>
|
||||
<img class="image_resized" style="aspect-ratio:853/315;width:50%;" src="4_File_image.png"
|
||||
width="853" height="315">
|
||||
</p>
|
||||
</li>
|
||||
<li>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
|
||||
>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>
|
||||
98
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Markdown.html
generated
vendored
98
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Markdown.html
generated
vendored
@@ -4,8 +4,10 @@
|
||||
(converted to Trilium's internal HTML format) or saved as a <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_6f9hih2hXXZk">Code</a> note
|
||||
with only syntax highlight.</p>
|
||||
<p>v0.103.0 introduces a new note type: Markdown which which displays Markdown
|
||||
source and a preview on the right.</p>
|
||||
<p>This note type is a split view, meaning that both the source code and
|
||||
a preview of the document are displayed side-by-side. See <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_SL5f1Auq7sVN">Note types with split view</a> for
|
||||
more information.</p>
|
||||
<h2>Rationale</h2>
|
||||
<p>The goal of this note type is to fill a gap: rendering Markdown but not
|
||||
altering its structure or its whitespace which would inevitably change
|
||||
@@ -19,18 +21,15 @@
|
||||
One of the core aspects of the Markdown integration is that it reuses components
|
||||
that are already available through other features of the application.</p>
|
||||
</aside>
|
||||
<h2>Creating Markdown notes</h2>
|
||||
<p>There are two ways to create a Markdown note:</p>
|
||||
<ol>
|
||||
<li>Create a new note (e.g. in the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_oPVyFC7WL2Lp">Note Tree</a>)
|
||||
and select the type <em>Markdown</em>, just like all the other note types.</li>
|
||||
<li
|
||||
>Create a note of type <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_6f9hih2hXXZk">Code</a> and
|
||||
select as the language either <em>Markdown </em>or <em>GitHub-Flavored Markdown</em>.
|
||||
This maintains compatibility with your existing notes prior to the introduction
|
||||
of this feature.</li>
|
||||
</ol>
|
||||
<h2>Supported features in preview</h2>
|
||||
<h2>Features</h2>
|
||||
<h3>Source view pane</h3>
|
||||
<ul>
|
||||
<li>Syntax highlighting for the Markdown syntax.</li>
|
||||
<li>Nested syntax highlighting for code inside code blocks.</li>
|
||||
<li>When editing larger documents, the preview scrolls along with the source
|
||||
editor.</li>
|
||||
</ul>
|
||||
<h3>Preview pane</h3>
|
||||
<p>The following features are supported by Trilium's Markdown format and
|
||||
will show up in the preview pane:</p>
|
||||
<ul>
|
||||
@@ -50,7 +49,7 @@
|
||||
<p><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/_help_nBAXQFj20hS1">Include Note</a> (no
|
||||
builtin Markdown syntax, but HTML syntax works just fine):</p><pre><code class="language-text-x-trilium-auto"><section class="include-note" data-note-id="vJDjQm0VK8Na" data-box-size="expandable">
|
||||
&nbsp;
|
||||
</section></code></pre>
|
||||
</section>n</code></pre>
|
||||
</li>
|
||||
<li>
|
||||
<p><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/QEAPj01N5f7w/_help_hrZ1D00cLbal">Internal (reference) links</a> via
|
||||
@@ -59,9 +58,76 @@
|
||||
class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_m1lbrzyKDaRB">Note ID</a>):</p><pre><code class="language-text-x-trilium-auto">[[Hg8TS5ZOxti6]]</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Sync-scrolling</h2>
|
||||
<h2>Creating Markdown notes</h2>
|
||||
<p>There are two ways to create a Markdown note:</p>
|
||||
<ol>
|
||||
<li>Create a new note (e.g. in the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_oPVyFC7WL2Lp">Note Tree</a>)
|
||||
and select the type <em>Markdown</em>, just like all the other note types.</li>
|
||||
<li
|
||||
>Create a note of type <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_6f9hih2hXXZk">Code</a> and
|
||||
select as the language either <em>Markdown </em>or <em>GitHub-Flavored Markdown</em>.
|
||||
This maintains compatibility with your existing notes prior to the introduction
|
||||
of this feature.</li>
|
||||
</ol>
|
||||
<aside class="admonition note">
|
||||
<p>There is no distinction between the new Markdown note type and code notes
|
||||
of type Markdown; internally both are represented as <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_6f9hih2hXXZk">Code</a> notes
|
||||
with the proper MIME type (e.g. <code spellcheck="false">text/x-markdown</code>).</p>
|
||||
</aside>
|
||||
<h2>Import/export</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>By default, when importing a single Markdown file it automatically gets
|
||||
converted to a <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_iPIMuisry3hd">Text</a> note.
|
||||
To avoid that and have it imported as a Markdown note instead:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Right click the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_oPVyFC7WL2Lp">Note Tree</a> and
|
||||
select <em>Import into note</em>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Select the file normally.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Uncheck <em>Import HTML, Markdown and TXT as text notes if it's unclear from the metadata</em>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>When exporting Markdown files, the extension is preserved and the content
|
||||
remains the same as in the source view.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Once exported as a Trilium ZIP, the ZIP will preserve the Markdown type
|
||||
without converting to text notes thanks to the meta-information in it.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Conversion between text notes and Markdown notes</h2>
|
||||
<p>Currently there is no built-in functionality to convert a <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_iPIMuisry3hd">Text</a> note
|
||||
into a Markdown note or vice-versa. We do have plans to address this in
|
||||
the future.</p>
|
||||
<p>This can be achieved manually, for a single note:</p>
|
||||
<ol>
|
||||
<li>Export the file as Markdown, with single format.</li>
|
||||
<li>Import the file again, but unchecking <em>Import HTML, Markdown and TXT as text notes if it's unclear from the metadata</em>.</li>
|
||||
</ol>
|
||||
<p>For multiple notes, the process is slightly more involved:</p>
|
||||
<ol>
|
||||
<li>Export the file as Markdown, ZIP.</li>
|
||||
<li>Extract the archive.</li>
|
||||
<li>Remove the <code spellcheck="false">!!!meta.json</code> file.</li>
|
||||
<li>Compress the extracted files back into an archive.</li>
|
||||
<li>Import the newly create archive, but unchecking <em>Import HTML, Markdown and TXT as text notes if it's unclear from the metadata</em>.</li>
|
||||
</ol>
|
||||
<h2>Sync-scrolling & block highlight</h2>
|
||||
<p>When scrolling through the editing pane, the preview pane will attempt
|
||||
to synchronize its position to make it easier to see the preview.</p>
|
||||
<p>In addition, the block in the preview matching the position of the cursor
|
||||
in the source view will appear slightly highlighted.</p>
|
||||
<p>The sync is currently one-way only, scrolling the preview will not synchronize
|
||||
the position of the editor.</p>
|
||||
<p>This feature cannot be disabled as of now; if the scrolling feels distracting,
|
||||
consider temporarily switching to the editor mode and then switching to
|
||||
preview mode when ready.</p>
|
||||
|
||||
@@ -6,11 +6,15 @@
|
||||
<img style="aspect-ratio:886/663;" src="2_Mermaid Diagrams_image.png"
|
||||
width="886" height="663">
|
||||
</figure>
|
||||
<h2>Types of diagrams</h2>
|
||||
<p>Trilium supports Mermaid, which adds support for various diagrams such
|
||||
as flowchart, sequence diagram, class diagram, state diagram, pie charts,
|
||||
etc., all using a text description of the chart instead of manually drawing
|
||||
the diagram.</p>
|
||||
<p>This note type is a split view, meaning that both the source code and
|
||||
a preview of the document are displayed side-by-side. See <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_SL5f1Auq7sVN">Note types with split view</a> for
|
||||
more information.</p>
|
||||
<h2>Sample diagrams</h2>
|
||||
<p>Starting with v0.103.0, Mermaid diagrams no longer start with a sample
|
||||
flowchart, but instead a pane at the bottom will show all the supported
|
||||
diagrams with sample code for each:</p>
|
||||
@@ -66,7 +70,7 @@
|
||||
<li
|
||||
>Press the <em>Copy image reference to the clipboard</em> to be able to insert
|
||||
the image representation of the diagram into a text note. See <a class="reference-link"
|
||||
href="#root/_help_0Ofbk1aSuVRu">[missing note]</a> for more information.</li>
|
||||
href="#root/_help_0Ofbk1aSuVRu">Image references</a> for more information.</li>
|
||||
<li
|
||||
>Press the <em>Export diagram as SVG</em> to download a scalable/vector rendering
|
||||
of the diagram. Can be used to present the diagram without degrading when
|
||||
|
||||
23
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Spreadsheets.html
generated
vendored
23
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Spreadsheets.html
generated
vendored
@@ -64,15 +64,15 @@
|
||||
yet:</p>
|
||||
<ul>
|
||||
<li>Trilium-specific formulas (e.g. to obtain the title of a note).</li>
|
||||
<li>User-defined formulas</li>
|
||||
<li>Cross-workbook calculation</li>
|
||||
<li
|
||||
>User-defined formulas</li>
|
||||
<li>Cross-workbook calculation</li>
|
||||
</ul>
|
||||
<p>If you would like us to work on these features, consider <a href="https://triliumnotes.org/en/support-us">supporting us</a>.</p>
|
||||
<h2>Known limitations</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p>It is possible to share a spreadsheet, case in which a best-effort HTML
|
||||
rendering of the spreadsheet is done.</p>
|
||||
<li>It is possible to share a spreadsheet, case in which a best-effort HTML
|
||||
rendering of the spreadsheet is done.
|
||||
<ul>
|
||||
<li>For more advanced use cases, this will most likely not work as intended.
|
||||
Feel free to <a href="#root/_help_wy8So3yZZlH9">report issues</a>, but keep in
|
||||
@@ -80,12 +80,9 @@
|
||||
the features of Univer.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>There is currently no export functionality, as stated previously.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>There is no dedicated mobile support. Mobile support is currently experimental
|
||||
in Univer and when it becomes stable, we could potentially integrate it
|
||||
into Trilium as well.</p>
|
||||
</li>
|
||||
<li>There is currently no export functionality, as stated previously.</li>
|
||||
<li
|
||||
>There is no dedicated mobile support. Mobile support is currently experimental
|
||||
in Univer and when it becomes stable, we could potentially integrate it
|
||||
into Trilium as well.</li>
|
||||
</ul>
|
||||
117
docs/User Guide/!!!meta.json
vendored
117
docs/User Guide/!!!meta.json
vendored
@@ -3962,6 +3962,83 @@
|
||||
"attachments": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"isClone": false,
|
||||
"noteId": "SL5f1Auq7sVN",
|
||||
"notePath": [
|
||||
"pOsGYCXsbNQG",
|
||||
"gh7bpGYxajRS",
|
||||
"Vc8PjrjAGuOp",
|
||||
"SL5f1Auq7sVN"
|
||||
],
|
||||
"title": "Note types with split view",
|
||||
"notePosition": 230,
|
||||
"prefix": null,
|
||||
"isExpanded": false,
|
||||
"type": "text",
|
||||
"mime": "text/html",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "s1aBHPd79XYj",
|
||||
"isInheritable": false,
|
||||
"position": 30
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "6RM1Q7ppFVoj",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "CoFPLs3dRlXc",
|
||||
"isInheritable": false,
|
||||
"position": 50
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "8YBEPzcpUgxw",
|
||||
"isInheritable": false,
|
||||
"position": 60
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "IjZS7iK5EXtb",
|
||||
"isInheritable": false,
|
||||
"position": 70
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "XpOYSgsLkTJy",
|
||||
"isInheritable": false,
|
||||
"position": 80
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "iconClass",
|
||||
"value": "bx bx-card",
|
||||
"isInheritable": false,
|
||||
"position": 90
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "shareAlias",
|
||||
"value": "note-types-with-split-view",
|
||||
"isInheritable": false,
|
||||
"position": 100
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
"dataFileName": "Note types with split view.md",
|
||||
"attachments": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -10094,6 +10171,13 @@
|
||||
"value": "bx bx-selection",
|
||||
"isInheritable": false,
|
||||
"position": 20
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "SL5f1Auq7sVN",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
@@ -10797,54 +10881,61 @@
|
||||
"isInheritable": false,
|
||||
"position": 80
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "wy8So3yZZlH9",
|
||||
"isInheritable": false,
|
||||
"position": 150
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "SL5f1Auq7sVN",
|
||||
"isInheritable": false,
|
||||
"position": 160
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "NwBbFdNZ9h7O",
|
||||
"isInheritable": false,
|
||||
"position": 90
|
||||
"position": 170
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "YfYAtQBcfo5V",
|
||||
"isInheritable": false,
|
||||
"position": 100
|
||||
"position": 180
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "s1aBHPd79XYj",
|
||||
"isInheritable": false,
|
||||
"position": 110
|
||||
"position": 190
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "nBAXQFj20hS1",
|
||||
"isInheritable": false,
|
||||
"position": 120
|
||||
"position": 200
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "hrZ1D00cLbal",
|
||||
"isInheritable": false,
|
||||
"position": 130
|
||||
"position": 210
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "m1lbrzyKDaRB",
|
||||
"isInheritable": false,
|
||||
"position": 140
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "wy8So3yZZlH9",
|
||||
"isInheritable": false,
|
||||
"position": 150
|
||||
"position": 220
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
|
||||
21
docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note types with split view.md
vendored
Normal file
21
docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note types with split view.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Note types with split view
|
||||
Split view is a feature of <a class="reference-link" href="../../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a> and <a class="reference-link" href="../../Note%20Types/Markdown.md">Markdown</a> notes which displays both the source code on one side and the preview of the content on the other.
|
||||
|
||||
<a class="reference-link" href="../../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a> also allow changing between a horizontal or a vertical split, to accommodate for the various sizes of diagrams.
|
||||
|
||||
## Display modes and interaction
|
||||
|
||||
The split comes with three different display modes:
|
||||
|
||||
* _Split view_, in which both the source code is available on one side and can be edited, and the preview is available on the other side.
|
||||
* In this mode, the size of either the source pane or the preview pane can be adjusted by dragging the small border between them.
|
||||
* _Source view_ which shows the source code on the entire screen for a more focused editing experience.
|
||||
* _Preview_ which displays only the rendering of the diagram or text in full screen, especially useful for read-only notes.
|
||||
|
||||
These buttons can be found near the <a class="reference-link" href="Note%20buttons.md">Note buttons</a> section on the <a class="reference-link" href="New%20Layout.md">New Layout</a>, or in the <a class="reference-link" href="Floating%20buttons.md">Floating buttons</a> on the old layout.
|
||||
|
||||
The display node is stored at note level.
|
||||
|
||||
## Relation to read-only notes
|
||||
|
||||
If a note is marked as [read-only](../Notes/Read-Only%20Notes.md), the source view will not be editable. While in preview mode, marking a note as read-only has no effect since the preview itself is not editable.
|
||||
@@ -1,7 +1,7 @@
|
||||
# Markdown
|
||||
Trilium has always supported Markdown through its [import feature](../Basic%20Concepts%20and%20Features/Import%20%26%20Export/Markdown.md), however the file was either transformed to a <a class="reference-link" href="Text.md">Text</a> note (converted to Trilium's internal HTML format) or saved as a <a class="reference-link" href="Code.md">Code</a> note with only syntax highlight.
|
||||
|
||||
v0.103.0 introduces a new note type: Markdown which which displays Markdown source and a preview on the right.
|
||||
This note type is a split view, meaning that both the source code and a preview of the document are displayed side-by-side. See <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20types%20with%20split%20view.md">Note types with split view</a> for more information.
|
||||
|
||||
## Rationale
|
||||
|
||||
@@ -12,14 +12,15 @@ Even if Markdown is now specially treated by having a preview mechanism, Trilium
|
||||
> [!NOTE]
|
||||
> Feature requests regarding the Markdown implementation will be considered, but if they are outside the realm of Trilium they will not be implemented. One of the core aspects of the Markdown integration is that it reuses components that are already available through other features of the application.
|
||||
|
||||
## Creating Markdown notes
|
||||
## Features
|
||||
|
||||
There are two ways to create a Markdown note:
|
||||
### Source view pane
|
||||
|
||||
1. Create a new note (e.g. in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a>) and select the type _Markdown_, just like all the other note types.
|
||||
2. Create a note of type <a class="reference-link" href="Code.md">Code</a> and select as the language either _Markdown_ or _GitHub-Flavored Markdown_. This maintains compatibility with your existing notes prior to the introduction of this feature.
|
||||
* Syntax highlighting for the Markdown syntax.
|
||||
* Nested syntax highlighting for code inside code blocks.
|
||||
* When editing larger documents, the preview scrolls along with the source editor.
|
||||
|
||||
## Supported features in preview
|
||||
### Preview pane
|
||||
|
||||
The following features are supported by Trilium's Markdown format and will show up in the preview pane:
|
||||
|
||||
@@ -33,7 +34,7 @@ The following features are supported by Trilium's Markdown format and will show
|
||||
```
|
||||
<section class="include-note" data-note-id="vJDjQm0VK8Na" data-box-size="expandable">
|
||||
|
||||
</section>
|
||||
</section>n
|
||||
```
|
||||
* <a class="reference-link" href="Text/Links/Internal%20(reference)%20links.md">Internal (reference) links</a> via its HTML syntax, or through a _Wikilinks_\-like format (only <a class="reference-link" href="../Advanced%20Usage/Note%20ID.md">Note ID</a>):
|
||||
|
||||
@@ -41,10 +42,51 @@ The following features are supported by Trilium's Markdown format and will show
|
||||
[[Hg8TS5ZOxti6]]
|
||||
```
|
||||
|
||||
## Sync-scrolling
|
||||
## Creating Markdown notes
|
||||
|
||||
There are two ways to create a Markdown note:
|
||||
|
||||
1. Create a new note (e.g. in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a>) and select the type _Markdown_, just like all the other note types.
|
||||
2. Create a note of type <a class="reference-link" href="Code.md">Code</a> and select as the language either _Markdown_ or _GitHub-Flavored Markdown_. This maintains compatibility with your existing notes prior to the introduction of this feature.
|
||||
|
||||
> [!NOTE]
|
||||
> There is no distinction between the new Markdown note type and code notes of type Markdown; internally both are represented as <a class="reference-link" href="Code.md">Code</a> notes with the proper MIME type (e.g. `text/x-markdown`).
|
||||
|
||||
## Import/export
|
||||
|
||||
* By default, when importing a single Markdown file it automatically gets converted to a <a class="reference-link" href="Text.md">Text</a> note. To avoid that and have it imported as a Markdown note instead:
|
||||
|
||||
* Right click the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and select _Import into note_.
|
||||
* Select the file normally.
|
||||
* Uncheck _Import HTML, Markdown and TXT as text notes if it's unclear from the metadata_.
|
||||
* When exporting Markdown files, the extension is preserved and the content remains the same as in the source view.
|
||||
* Once exported as a Trilium ZIP, the ZIP will preserve the Markdown type without converting to text notes thanks to the meta-information in it.
|
||||
|
||||
## Conversion between text notes and Markdown notes
|
||||
|
||||
Currently there is no built-in functionality to convert a <a class="reference-link" href="Text.md">Text</a> note into a Markdown note or vice-versa. We do have plans to address this in the future.
|
||||
|
||||
This can be achieved manually, for a single note:
|
||||
|
||||
1. Export the file as Markdown, with single format.
|
||||
2. Import the file again, but unchecking _Import HTML, Markdown and TXT as text notes if it's unclear from the metadata_.
|
||||
|
||||
For multiple notes, the process is slightly more involved:
|
||||
|
||||
1. Export the file as Markdown, ZIP.
|
||||
2. Extract the archive.
|
||||
3. Remove the `!!!meta.json` file.
|
||||
4. Compress the extracted files back into an archive.
|
||||
5. Import the newly create archive, but unchecking _Import HTML, Markdown and TXT as text notes if it's unclear from the metadata_.
|
||||
|
||||
## Sync-scrolling & block highlight
|
||||
|
||||
When scrolling through the editing pane, the preview pane will attempt to synchronize its position to make it easier to see the preview.
|
||||
|
||||
In addition, the block in the preview matching the position of the cursor in the source view will appear slightly highlighted.
|
||||
|
||||
The sync is currently one-way only, scrolling the preview will not synchronize the position of the editor.
|
||||
|
||||
This feature cannot be disabled as of now; if the scrolling feels distracting, consider temporarily switching to the editor mode and then switching to preview mode when ready.
|
||||
|
||||
> [!NOTE]
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
|
||||
<figure class="image image-style-align-center"><img style="aspect-ratio:886/663;" src="2_Mermaid Diagrams_image.png" width="886" height="663"></figure>
|
||||
|
||||
## Types of diagrams
|
||||
|
||||
Trilium supports Mermaid, which adds support for various diagrams such as flowchart, sequence diagram, class diagram, state diagram, pie charts, etc., all using a text description of the chart instead of manually drawing the diagram.
|
||||
|
||||
This note type is a split view, meaning that both the source code and a preview of the document are displayed side-by-side. See <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20types%20with%20split%20view.md">Note types with split view</a> for more information.
|
||||
|
||||
## Sample diagrams
|
||||
|
||||
Starting with v0.103.0, Mermaid diagrams no longer start with a sample flowchart, but instead a pane at the bottom will show all the supported diagrams with sample code for each:
|
||||
|
||||
* Simply click on any of the samples to apply it.
|
||||
@@ -35,7 +37,7 @@ It's possible to switch between the two layouts at any time by pressing the  of the diagram. Can be used to send the diagram in more traditional channels such as e-mail.
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ If you would like us to work on these features, consider [supporting us](https:/
|
||||
## Known limitations
|
||||
|
||||
* It is possible to share a spreadsheet, case in which a best-effort HTML rendering of the spreadsheet is done.
|
||||
|
||||
* For more advanced use cases, this will most likely not work as intended. Feel free to [report issues](../Troubleshooting/Reporting%20issues.md), but keep in mind that we might not be able to have a complete feature parity with all the features of Univer.
|
||||
* There is currently no export functionality, as stated previously.
|
||||
* There is no dedicated mobile support. Mobile support is currently experimental in Univer and when it becomes stable, we could potentially integrate it into Trilium as well.
|
||||
Reference in New Issue
Block a user