From 664d28f1054b4e598aa7cd71b16f852ab63076a7 Mon Sep 17 00:00:00 2001
From: Elian Doran This feature allows printing of notes. It works on both the desktop client,
but also on the web.Printing
#printLandscape.#printPageSize attribute,
with one of the following values: A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger.Since v0.100.0, it is possible to print more than one note at the time by using Collections:
The resulting collection will contain all the children of the collection, while maintaining the hierarchy.
@@ -86,9 +86,9 @@ class="admonition note"> href="#root/_help_4TIF1oA4VQRO">Options and assigning a key combination for:#printLandscape if
+ supported thanks to pagination.#printLandscape if
exporting to PDF.To do so:
~printCss relation to
+ ~printCss relation to
point to the newly created CSS code note.To remark:
~printCss relations.printCss doesn't have the right
+ ~printCss relations.printCss doesn't have the right
note type or mime type, it will be ignored.@media print { since
- the style-sheet is used only for printing.@media print { since
+ the style-sheet is used only for printing.Both printing and exporting as PDF use the same mechanism: a note is rendered diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.html index 27437786f..e4706e317 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.html @@ -1,12 +1,13 @@
doRender must not be overridden, instead doRenderBody() has
+ doRender must not be overridden, instead doRenderBody() has
to be overridden.
doRenderBody can optionally be async.doRenderBody can optionally be async.parentWidget() must be set to “rightPane”.widgetTitle() getter can optionally be overriden, otherwise
+ parentWidget() must be set to “rightPane”.widgetTitle() getter can optionally be overriden, otherwise
the widget will be displayed as “Untitled widget”.const template = `<div>Hi</div>`;
@@ -23,12 +24,13 @@ class ToDoListWidget extends api.RightPanelWidget {
}
async refreshWithNote(note) {
- this.toggleInt(false);
- this.triggerCommand("reEvaluateRightPaneVisibility");
- this.toggleInt(true);
- this.triggerCommand("reEvaluateRightPaneVisibility");
+ // Do something when the note changes.
}
}
module.exports = new ToDoListWidget();
-The implementation is in src/public/app/widgets/right_panel_widget.js.
The implementation is in src/public/app/widgets/right_panel_widget.js.
In refreshWithNote:
const visible = true; // replace with your own visibility logic
+this.toggleInt(visible);
+this.triggerCommand("reEvaluateRightPaneVisibility");
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Documentation.md b/docs/Developer Guide/Developer Guide/Documentation.md
index 6e7ea215f..f891e39c9 100644
--- a/docs/Developer Guide/Developer Guide/Documentation.md
+++ b/docs/Developer Guide/Developer Guide/Documentation.md
@@ -1,5 +1,5 @@
# Documentation
-There are multiple types of documentation for Trilium:
+There are multiple types of documentation for Trilium:
* The _User Guide_ represents the user-facing documentation. This documentation can be browsed by users directly from within Trilium, by pressing F1.
* The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers.
diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json
index 014f86614..9932db6be 100644
--- a/docs/User Guide/!!!meta.json
+++ b/docs/User Guide/!!!meta.json
@@ -4104,31 +4104,38 @@
{
"type": "relation",
"name": "internalLink",
- "value": "AlhDUqhENtH7",
+ "value": "2FvYrpmOXm29",
"isInheritable": false,
"position": 100
},
{
"type": "relation",
"name": "internalLink",
- "value": "bwZpz2ajCEwO",
+ "value": "AlhDUqhENtH7",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
- "value": "KC1HB96bqqHX",
+ "value": "bwZpz2ajCEwO",
"isInheritable": false,
"position": 120
},
{
"type": "relation",
"name": "internalLink",
- "value": "0ESUbbAxVnoK",
+ "value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 130
},
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "0ESUbbAxVnoK",
+ "isInheritable": false,
+ "position": 140
+ },
{
"type": "label",
"name": "iconClass",
@@ -4142,13 +4149,6 @@
"value": "printing-and-pdf-export",
"isInheritable": false,
"position": 110
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "2FvYrpmOXm29",
- "isInheritable": false,
- "position": 140
}
],
"format": "markdown",
diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.md
index 7a8cf8cd4..e64364fc8 100644
--- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.md
+++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.md
@@ -20,14 +20,21 @@ class ToDoListWidget extends api.RightPanelWidget {
}
async refreshWithNote(note) {
- this.toggleInt(false);
- this.triggerCommand("reEvaluateRightPaneVisibility");
- this.toggleInt(true);
- this.triggerCommand("reEvaluateRightPaneVisibility");
+ // Do something when the note changes.
}
}
module.exports = new ToDoListWidget();
```
-The implementation is in `src/public/app/widgets/right_panel_widget.js`.
\ No newline at end of file
+The implementation is in `src/public/app/widgets/right_panel_widget.js`.
+
+## Conditionally changing visibility
+
+In `refreshWithNote`:
+
+```
+const visible = true; // replace with your own visibility logic
+this.toggleInt(visible);
+this.triggerCommand("reEvaluateRightPaneVisibility");
+```
\ No newline at end of file