Merge remote-tracking branch 'origin/main' into feat/about-dialog-overhaul

This commit is contained in:
Elian Doran
2026-04-19 12:49:46 +03:00
48 changed files with 820 additions and 593 deletions

View File

@@ -42,7 +42,7 @@ jobs:
shell: bash
forge_platform: linux
- name: windows
image: win-signing
image: windows-latest
shell: cmd
forge_platform: win32
# Exclude ARM64 Linux from default matrix to use native runner
@@ -88,12 +88,10 @@ jobs:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
WINDOWS_SIGN_EXECUTABLE: ${{ vars.WINDOWS_SIGN_EXECUTABLE }}
WINDOWS_SIGN_ERROR_LOG: ${{ vars.WINDOWS_SIGN_ERROR_LOG }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGN_KEY }}
- name: Publish release
uses: softprops/action-gh-release@v2.6.2
uses: softprops/action-gh-release@v3.0.0
if: ${{ github.event_name != 'pull_request' }}
with:
make_latest: false
@@ -134,7 +132,7 @@ jobs:
arch: ${{ matrix.arch }}
- name: Publish release
uses: softprops/action-gh-release@v2.6.2
uses: softprops/action-gh-release@v3.0.0
if: ${{ github.event_name != 'pull_request' }}
with:
make_latest: false

View File

@@ -150,7 +150,7 @@ jobs:
path: upload
- name: Publish stable release
uses: softprops/action-gh-release@v2.6.2
uses: softprops/action-gh-release@v3.0.0
with:
draft: false
body_path: docs/Release Notes/Release Notes/${{ github.ref_name }}.md

View File

@@ -58,7 +58,7 @@ jobs:
compression-level: 0
- name: Release web clipper extension
uses: softprops/action-gh-release@v2.6.2
uses: softprops/action-gh-release@v3.0.0
if: ${{ startsWith(github.ref, 'refs/tags/web-clipper-v') }}
with:
draft: false

View File

@@ -4,9 +4,6 @@
--print-font-size: 11pt;
}
@page {
margin: 2cm;
}
html,
body {

View File

@@ -32,6 +32,14 @@ async function main() {
await import("./print.css");
// Browser printing relies on @page margins since there's no programmatic control.
// Electron uses printToPDF() margins instead, so we only inject this for the browser path.
if (!isElectron()) {
const style = document.createElement("style");
style.textContent = "@page { margin: 2cm; }";
document.head.appendChild(style);
}
// Load the user's font preferences so that --detail-font-family is available.
const fontLink = document.createElement("link");
fontLink.rel = "stylesheet";

View File

@@ -46,11 +46,11 @@ export async function postProcessRichContent(note: FNote | FAttachment, $rendere
const noteIdsToPrefetch = referenceLinks.map((i, el) => getNoteIdFromLink(el));
await froca.getNotes(noteIdsToPrefetch);
for (const el of referenceLinks) {
await Promise.all(referenceLinks.toArray().map(async (el) => {
const innerSpan = document.createElement("span");
await link.loadReferenceLinkTitle($(innerSpan), el.href);
await link.loadReferenceLinkTitle($(innerSpan), el.getAttribute("href"));
el.replaceChildren(innerSpan);
}
}));
await rewriteMermaidDiagramsInContainer($renderedContent[0] as HTMLDivElement);
await formatCodeBlocks($renderedContent);

View File

@@ -41,7 +41,9 @@
"link_title_mirrors": "链接标题跟随笔记标题变化",
"link_title_arbitrary": "链接标题可随意修改",
"link_title": "链接标题",
"button_add_link": "添加链接"
"button_add_link": "添加链接",
"anchor": "锚点(可选)",
"anchor_none": "无(笔记链接)"
},
"branch_prefix": {
"edit_branch_prefix": "编辑分支前缀",
@@ -1124,9 +1126,9 @@
"font_family": "字体系列",
"size": "大小",
"note_tree_font": "笔记树字体",
"note_detail_font": "笔记详情字体",
"monospace_font": "等宽(代码)字体",
"not_all_fonts_available": "并非所有列出的字体都可能在您的系统上可用",
"note_detail_font": "文档字体",
"monospace_font": "等宽字体",
"not_all_fonts_available": "并非所有列出的字体都可能在您的系统上可用",
"generic-fonts": "通用字体",
"sans-serif-system-fonts": "无衬线系统字体",
"serif-system-fonts": "衬线系统字体",
@@ -1137,7 +1139,10 @@
"monospace": "等宽",
"system-default": "系统默认",
"custom_fonts": "使用自定义字体",
"preview": "预览"
"preview": "预览",
"monospace_font_description": "用于代码注释和代码块",
"size_relative_to_general": "大小相对于一般字体大小",
"apply_changes": "重新加载以应用更改"
},
"max_content_width": {
"title": "内容宽度",
@@ -1157,20 +1162,23 @@
"edited_notes_message": "日记笔记自动打开编辑过的笔记功能区标签页"
},
"theme": {
"title": "主题",
"theme_label": "主题",
"title": "用户界面",
"theme_label": "应用主题",
"override_theme_fonts_label": "覆盖主题字体",
"triliumnext": "Trilium跟随系统颜色方案",
"triliumnext-light": "Trilium浅色",
"triliumnext-dark": "Trilium深色",
"triliumnext": "跟随系统颜色方案",
"triliumnext-light": "浅色",
"triliumnext-dark": "深色",
"layout": "布局",
"layout-vertical-title": "垂直",
"layout-horizontal-title": "水平",
"layout-vertical-description": "启动栏位于左侧(默认)",
"layout-horizontal-description": "启动栏位于标签页栏下方,标签页栏现在是全宽的。",
"auto_theme": "传统(跟随系统配色方案",
"light_theme": "传统(浅色",
"dark_theme": "传统(深色"
"auto_theme": "跟随系统配色方案",
"light_theme": "浅色",
"dark_theme": "深色",
"modern_themes": "现代",
"legacy_themes": "传统",
"custom_themes": "自定义"
},
"zoom_factor": {
"title": "缩放系数(仅桌面客户端有效)",
@@ -1179,7 +1187,7 @@
"code_auto_read_only_size": {
"title": "自动只读大小",
"description": "自动只读大小是指笔记超过设置的大小后自动设置为只读模式(为性能考虑)。",
"label": "自动只读大小(代码笔记)",
"label": "自动只读大小",
"unit": "字符"
},
"code_mime_types": {
@@ -1222,22 +1230,27 @@
"batch_ocr_error": "批量处理过程中出错:{{error}}"
},
"attachment_erasure_timeout": {
"attachment_erasure_timeout": "附件清理超时",
"erase_attachments_after": "在此时间后删除未使用的附件",
"manual_erasing_description": "您还可以手动触发清理(而不考虑上述定义的超时时间):",
"erase_unused_attachments_now": "立即清理未使用的附件笔记",
"unused_attachments_erased": "未使用的附件已被删除。"
"attachment_erasure_timeout": "未使用的附件",
"erase_attachments_after": "在此时间后清理未使用的附件",
"manual_erasing_description": "手动触发清理,忽略上述超时。",
"erase_unused_attachments_now": "立即清理未使用的附件",
"unused_attachments_erased": "未使用的附件已被清理。",
"description": "不再被任何笔记引用的附件被视为未使用,可以在一段时间后自动清理。",
"erase_attachments_after_description": "未使用附件被永久清理前的时间。"
},
"network_connections": {
"network_connections_title": "网络连接",
"check_for_updates": "自动检查更新"
"network_connections_title": "网络",
"check_for_updates": "自动检查更新",
"check_for_updates_description": "在 GitHub 上检查新版本,并在可用时在全局菜单中显示通知。"
},
"note_erasure_timeout": {
"note_erasure_timeout_title": "笔记清理超时",
"erase_notes_after": "在此时间后删除笔记",
"manual_erasing_description": "您还可以手动触发清理(不考虑上述定义的超时):",
"note_erasure_timeout_title": "已删除的笔记",
"erase_notes_after": "在此时间后清理笔记",
"manual_erasing_description": "手动触发清理,忽略上述超时。",
"erase_deleted_notes_now": "立即清理已删除的笔记",
"deleted_notes_erased": "已删除的笔记已被清理。"
"deleted_notes_erased": "已删除的笔记已被清理。",
"description": "删除的笔记最初只是被标记为已删除,可以从“最近的笔记”中恢复。经过一段时间后,它们将被永久清理。",
"erase_notes_after_description": "删除的笔记被永久清理之前的时间。"
},
"revisions_snapshot_interval": {
"note_revisions_snapshot_interval_title": "笔记修订快照间隔",
@@ -1859,7 +1872,9 @@
}
},
"code-editor-options": {
"title": "编辑器"
"title": "编辑器",
"tab_width": "制表符宽度",
"tab_width_unit": "空格"
},
"custom_date_time_format": {
"title": "自定义日期/时间格式",
@@ -2018,11 +2033,11 @@
},
"ui-performance": {
"title": "性能",
"enable-motion": "启用过渡和动画",
"enable-shadows": "启用阴影",
"enable-backdrop-effects": "启用菜单、弹窗和面板的背景效果",
"enable-smooth-scroll": "启用平滑滚动",
"app-restart-required": "(需重启程序以应用更改)"
"enable-motion": "过渡和动画",
"enable-shadows": "阴影",
"enable-backdrop-effects": "菜单、弹窗和面板的背景效果",
"enable-smooth-scroll": "平滑滚动",
"app-restart-required": "需要重启应用"
},
"pagination": {
"total_notes": "{{count}} 篇笔记",
@@ -2348,5 +2363,8 @@
},
"database": {
"title": "数据库"
},
"auto_link_attribute_list": {
"title": "系统属性"
}
}

View File

@@ -41,7 +41,8 @@
"link_title_mirrors": "ئۇلانما تېمىسى خاتىرىنىڭ ھازىرقى تېمىسى بىلەن ماس قەدەم بولىدۇ",
"link_title_arbitrary": "ئۇلانما تېمىسىنى خالىغانچە ئۆزگەرتىشكە بولىدۇ",
"link_title": "ئۇلانما تېمىسى",
"button_add_link": "ئۇلانما قوشۇش"
"button_add_link": "ئۇلانما قوشۇش",
"anchor_none": "يوق (خاتىرىگە ئۇلاش)"
},
"branch_prefix": {
"edit_branch_prefix": "شاخچە ئالدى قوشۇمچىسىنى تەھرىرلەش",
@@ -166,7 +167,14 @@
"showSQLConsole": "SQL كونترول سۇپىسىنى كۆرسىتىش",
"other": "باشقىلار",
"quickSearch": "نۇر بەلگىسىنى تېز ئىزدەش رامكىسىغا يۆتكەش",
"inPageSearch": "بەت ئىچىدە ئىزدەش"
"inPageSearch": "بەت ئىچىدە ئىزدەش",
"showJumpToNoteDialog": "كۆرسىتىش<a class=\"external\" href=\"https://triliumnext.github.io/Docs/Wiki/note-navigation.html#jump-to-note\">\"بۇنىڭغا ئاتلاش\" سۆزلىشىش رامكىسى</a>",
"closeActiveTab": "ئاكتىپ بەتكۈچنى يېپىش",
"activateNextTab": "كېيىنكى بەتكۈچنى ئاكتىپلاش",
"activatePreviousTab": "ئالدىنقى بەتكۈچنى ئاكتىپلاش",
"editNoteTitle": "دەرەخسىمان خاتىرە تىزىملىكىدە، فوكۇس خاتىرە دەرىخىدىن خاتىرە ماۋزۇسىغا يۆتكىلىدۇ. Enter كۇنۇپكىسىنى باسسىڭىز فوكۇس خاتىرە ماۋزۇسىدىن تېكىست تەھرىرلىگۈچكە يۆتكىلىدۇ. <kbd>Ctrl+.</kbd> كۇنۇپكىسىنى باسسىڭىز فوكۇس تەھرىرلىگۈچتىن يەنە خاتىرە دەرىخىگە قايتىدۇ.",
"onlyInDesktop": "پەقەت Desktop نۇسخىسى (Electron build)",
"editBranchPrefix": "ئاكتىپ خاتىرە كوپىيىسىنىڭ تەھرىرلەش <a class=\"external\" href=\"https://triliumnext.github.io/Docs/Wiki/tree-concepts.html#prefix\">ئالدى قوشۇمچە</a>"
},
"import": {
"importIntoNote": "خاتىرىگە كىرگۈزۈش",
@@ -188,11 +196,32 @@
},
"import-status": "كىرگۈزۈش ھالىتى",
"in-progress": "ئەكىرىلىۋاتىدۇ: {{progress}}",
"successful": "كىرگۈزۈش مۇۋەپپەقىيەتلىك تاماملاندى."
"successful": "كىرگۈزۈش مۇۋەپپەقىيەتلىك تاماملاندى.",
"explodeArchives": "<code>.zip</code>、<code>.enex</code> ۋە<code>.opml</code> ئارخىپ ھۆججەتلىرىنىڭ مەزمۇنىنى ئوقۇش.",
"codeImportedAsCode": "ئەگەر مېتا سانلىق مەلۇماتى ئېنىق بولمىسا، پەرقلەندۈرۈلگەن كود ھۆججىتىنى (مەسىلەن<code>.json</code>) كود خاتىرىسى سۈپىتىدە ئەكىرىش"
},
"include_note": {
"dialog_title": "خاتىرىنى ئۆز ئىچىگە ئېلىش",
"label_note": "خاتىرە",
"placeholder_search": "خاتىرىنى نامى بويىچە ئىزدەش"
"placeholder_search": "خاتىرىنى نامى بويىچە ئىزدەش",
"box_size_prompt": "ئۆز ئىچىگە ئالغان خاتىرىنىڭ رامكا چوڭلۇقى:",
"box_size_small": "كىچىك (10 قۇر ئەتراپىدا)",
"box_size_medium": "ئوتتۇراھال (30 قۇر ئەتراپىدا)",
"box_size_full": "تولۇق (رامكىدا پۈتۈن تېكىست كۆرسىتىلىدۇ)",
"box_size_expandable": "يېيىلىدىغان (ئەسلىدىكى ھالەتتە يىغىلغان)",
"button_include": "خاتىرىنى ئۆز ئىچىگە ئېلىش"
},
"info": {
"modalTitle": "ئۇچۇر ئۇقتۇرۇشى",
"closeButton": "تاقاش",
"okButton": "OK",
"copy_to_clipboard": "چاپلاش تاختىسىغا كۆچۈرۈش"
},
"jump_to_note": {
"search_placeholder": "خاتىرىنى نامى ياكى تىپى بويىچە ئىزدەڭ، بۇيرۇق ئۈچۈن >بەلگىسىنى كىرگۈزۈڭ...",
"search_button": "تولۇق تېكىست بويىچە ئىزدەش"
},
"markdown_import": {
"dialog_title": "Markdown نى كىرگۈزۈش"
}
}

View File

@@ -114,7 +114,7 @@
"mime-types": "3.0.2",
"multer": "2.1.1",
"normalize-strings": "1.1.1",
"officeparser": "6.0.7",
"officeparser": "6.1.0",
"rand-token": "1.0.1",
"safe-compare": "1.1.4",
"sanitize-filename": "1.6.4",

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
<figure class="image image-style-align-center">
<img style="aspect-ratio:991/403;" src="1_Jump to_image.png"
<img style="aspect-ratio:991/403;" src="1_Jump to & command palette_.png"
width="991" height="403">
</figure>
<h2>Jump to Note</h2>
@@ -10,7 +10,7 @@
<ul>
<li>In the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
press
<img src="2_Jump to_image.png">button.</li>
<img src="2_Jump to & command palette_.png">button.</li>
<li>Using the keyboard, press <kbd>Ctrl</kbd> + <kbd>J</kbd>.</li>
</ul>
<p>In addition to searching for notes, it is also possible to search for
@@ -33,7 +33,7 @@
<p>Alternatively you can click on the "time" icon on the right.</p>
<h2>Command Palette</h2>
<figure class="image image-style-align-center">
<img style="aspect-ratio:982/524;" src="Jump to_image.png"
<img style="aspect-ratio:982/524;" src="Jump to & command palette_.png"
width="982" height="524">
</figure>
<p>The command palette is a feature which allows easy execution of various
@@ -52,7 +52,8 @@
<ul>
<li>Type a few words to filter between commands.</li>
<li>Use the up and down arrows on the keyboard or the mouse to select a command.</li>
<li>Press <kbd>Enter</kbd> to execute the command.</li>
<li
>Press <kbd>Enter</kbd> to execute the command.</li>
</ul>
<p>To exit the command palette:</p>
<ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 243 KiB

View File

@@ -6,13 +6,13 @@
of notes at regular intervals.</p>
<h2>Displaying the revisions</h2>
<ul>
<li>On the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_IjZS7iK5EXtb">New Layout</a>,
press the <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_8YBEPzcpUgxw">note context menu</a> and
select <em>Note revisions…</em>
<li>On the&nbsp;<a class="reference-link" href="#root/_help_IjZS7iK5EXtb">New Layout</a>,
press the <a href="#root/_help_8YBEPzcpUgxw">note context menu</a> and select <em>Note revisions…</em>
</li>
<li>On the old layout, press directly the
<img class="image_resized" style="aspect-ratio:27/25;width:2.32%;"
src="1_Note Revisions_image.png" width="27" height="25">button in the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_8YBEPzcpUgxw">Note buttons</a>&nbsp;area.</li>
src="1_Note Revisions_image.png" width="27"
height="25">button in the&nbsp;<a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a>&nbsp;area.</li>
</ul>
<h2>Interaction</h2>
<aside class="admonition note">
@@ -24,10 +24,9 @@
order.
<ul>
<li>The revisions are grouped by the date the revision was taken.</li>
<li
>This list does not contain the <em>current state</em> of the note, so it
<li>This list does not contain the <em>current state</em> of the note, so it
is possible to have notes with no revisions/snapshots saved.</li>
</ul>
</ul>
</li>
<li>The icon of a revision indicates the <em>source</em> of that revision (e.g.
a
@@ -72,14 +71,13 @@
</ul>
<p>To create a named revision, either:</p>
<ul>
<li>Go to the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_8YBEPzcpUgxw">Note buttons</a>,
<li>Go to the&nbsp;<a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a>,
select <em>Save named revision…</em>, enter the name of revision and confirm.</li>
<li
>Use the corresponding <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/_help_A9Oc6YKKc65v">keyboard shortcut</a> or
the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/wArbEsdSae6g/_help_F1r9QtzQLZqm">Jump to...</a>&nbsp;command
<li>Use the corresponding <a href="#root/_help_A9Oc6YKKc65v">keyboard shortcut</a> or
the&nbsp;<a class="reference-link" href="#root/_help_F1r9QtzQLZqm">Jump to...</a>&nbsp;command
with the same name.</li>
<li>Save a revision normally, and adjust the name afterwards from the note
revision list.</li>
<li>Save a revision normally, and adjust the name afterwards from the note
revision list.</li>
</ul>
<h2>When revisions are saved</h2>
<p>Revisions are saved:</p>
@@ -88,25 +86,22 @@
below).</li>
<li>Manually, by:
<ul>
<li>Going to the press the <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_8YBEPzcpUgxw">note context menu</a> and
<li>Going to the press the <a href="#root/_help_8YBEPzcpUgxw">note context menu</a> and
select <em>Save revision.</em>
</li>
<li>Using the <em>Force Save Revision</em> <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/_help_A9Oc6YKKc65v">keyboard shortcut</a>.</li>
<li
>In the <em>Revisions</em> dialog, pressing the […] button in the top-right
<li>Using the <em>Force Save Revision</em> <a href="#root/_help_A9Oc6YKKc65v">keyboard shortcut</a>.</li>
<li>In the <em>Revisions</em> dialog, pressing the […] button in the top-right
and selecting <em>Save a revision now</em>.</li>
</ul>
</ul>
</li>
</ul>
<p>Additionally, revisions can also come from somewhere else, and this is
indicated via the icon of the revision:</p>
<ul>
<li>Generated externally, by&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_pgxEVkzLl1OP">ETAPI (REST API)</a>.</li>
<li
>A modification created by&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/_help_GBBMSlVSOIGP">AI</a>.</li>
<li
>A revision is restored, causing the existing note content to be saved
as a revision to prevent potential data loss.</li>
<li>Generated externally, by&nbsp;<a class="reference-link" href="#root/_help_pgxEVkzLl1OP">ETAPI (REST API)</a>.</li>
<li>A modification created by&nbsp;<a class="reference-link" href="#root/_help_GBBMSlVSOIGP">AI</a>.</li>
<li>A revision is restored, causing the existing note content to be saved
as a revision to prevent potential data loss.</li>
</ul>
<h4>Snapshot interval</h4>
<p>Time interval of taking note snapshot is configurable in the Options -&gt;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 150 B

View File

@@ -1,199 +1,244 @@
<figure class="image">
<img style="aspect-ratio:951/432;" src="Printing & Exporting as PD.png"
width="951" height="432">
<figcaption>Screenshot of the note contextual menu indicating the “Export as PDF”
option.</figcaption>
<img style="aspect-ratio:2023/1488;" src="1_Printing & Exporting as PD.png"
width="2023" height="1488">
<figcaption>Screenshot of the Print preview functionality introduced in v0.103.0.</figcaption>
</figure>
<h2>Printing</h2>
<p>This feature allows printing of notes. It works on both the desktop client,
but also on the web.</p>
<p>Trilium allows printing notes to a real printer, or generating a structured
PDF for a single note or for multiple notes through&nbsp;<a class="reference-link"
href="#root/pOsGYCXsbNQG/_help_GTwFsgaA0lCt">Collections</a>.</p>
<p>Note that not all note types are printable as of now. We do plan to increase
the coverage of supported note types in the future.</p>
<p>Printing and exporting as PDF are not perfect. Due to technical limitations,
and sometimes even browser or Electron glitches the text might appear cut
off in some circumstances.&nbsp;</p>
<h2>Printing a note or exporting as PDF on the desktop</h2>
<aside class="admonition note">
<p>Versions prior to v0.103.0 had two different options, one for printing
and another one for exporting to PDF. With the introduction of the print
preview, these functions have been unified.</p>
</aside>
<p>On the desktop application of Trilium it is possible to export a note
as PDF. To print a note:</p>
<ul>
<li>Press the menu button in the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_8YBEPzcpUgxw">Note buttons</a>&nbsp;area
and select <em>Print note</em>.</li>
<li>Alternatively, printing can be triggered from a <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/_help_A9Oc6YKKc65v">keyboard shortcut</a> (unassigned
by default) or through the <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/wArbEsdSae6g/_help_F1r9QtzQLZqm">command palette</a>.</li>
</ul>
<p>This will trigger the print preview screen next.</p>
<h3>Print preview &amp; print options</h3>
<p>The print preview dialog allows the following printing options to be adjusted:</p>
<ul>
<li>
<p>The printer to use</p>
<ul>
<li>
<p><em>Save as PDF</em> generates a PDF that is structured (maintains a table
of contents, keeps the text selectable). Prefer this over other virtual
PDF printers that ship with the operating system.</p>
</li>
</ul>
</li>
<li>
<p>Page orientation: <em>Portrait</em> (default) or <em>Landscape</em>.</p>
</li>
<li>
<p>Page size</p>
</li>
<li>
<p>Scale the entire content from 10% to 200% to improve the fit within the
page.</p>
</li>
<li>
<p>Margins, which can be removed completely or adjusted individually for
all the four edges.</p>
</li>
<li>
<p>Print only a subset of pages. Individual page numbers are separated by
colons and hyphen-based ranges are supported (e.g. 3-5 for pages 3 to 5).</p>
</li>
</ul>
<p>Additional interaction:</p>
<ul>
<li><em>Print using system dialog</em> allows setting more options that are
otherwise not available in Trilium.</li>
</ul>
<aside class="admonition note">
<p>Most of the options here (expect printer &amp; which pages to print) are
managed at note level through&nbsp;<a class="reference-link" href="#root/_help_zEY4DaJG4YT5">Attributes</a>&nbsp;(such
as <code spellcheck="false">#printLandscape</code>, <code spellcheck="false">#printPageSize</code>,
<code
spellcheck="false">#printScale</code>, <code spellcheck="false">#printMargins</code>).</p>
<p>This means that the print settings will be restored when printing the
same note. There are no default settings that can be configured for all
the notes, but this can be achieved via <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_bwZpz2ajCEwO">inheritable attributes</a>.</p>
</aside>
<h2>Printing on the browser</h2>
<p>This feature allows printing of notes. It works on both the desktop client,
but also on the web.</p>
<p>To print a note, select the
<img src="1_Printing & Exporting as PD.png"
<img src="Printing & Exporting as PD.png"
width="29" height="31">button to the right of the note and select <em>Print note</em>. Depending
on the size and type of the note, this can take up to a few seconds. Afterwards
you will be redirected to the system/browser printing dialog.</p>
<aside
class="admonition note">
<p>Printing and exporting as PDF are not perfect. Due to technical limitations,
and sometimes even browser glitches the text might appear cut off in some
circumstances.&nbsp;</p>
</aside>
<h2>Reporting issues with the rendering</h2>
<p>Should you encounter any visual issues in the resulting PDF file (e.g.
a table does not fit properly, there is cut off text, etc.) feel free to
<p>On the server or PWA (mobile), the option is not available due to technical
constraints and it will be hidden.</p>
<h2>Reporting issues with the rendering</h2>
<p>Should you encounter any visual issues in the resulting PDF file (e.g.
a table does not fit properly, there is cut off text, etc.) feel free to
<a
href="#root/_help_wy8So3yZZlH9">report the issue</a>. In this case, it's best to offer a sample note (click
on the
<img src="Printing & Exporting as PD.png"
width="29" height="31">button, select Export note → This note and all of its descendants → HTML
in ZIP archive). Make sure not to accidentally leak any personal information.</p>
<p>Consider adjusting font sizes and using <a href="#root/_help_CohkqWQC1iBv">page breaks</a> to
work around the layout.</p>
<aside class="admonition tip">
<p>Although direct export as PDF is not available in the browser version
of the application, it's still possible to generate a PDF by selecting
the <em>Print</em> option instead and selecting “Save to PDF” as the printer
(depending on the browser). Generally, Mozilla Firefox has better printing
capabilities.</p>
</aside>
<h3>Automatic opening of the file</h3>
<p>When the PDF is exported, it is automatically opened with the system default
application for easy preview.</p>
<p>Note that if you are using Linux with the GNOME desktop environment, sometimes
the default application might seem incorrect (such as opening in GIMP).
This is because it uses Gnome's “Recommended applications” list.</p>
<p>To solve this, you can change the recommended application for PDFs via
this command line. First, list the available applications via <code spellcheck="false">gio mime application/pdf</code> and
then set the desired one. For example to use GNOME's Evince:</p><pre><code class="language-text-x-trilium-auto">gio mime application/pdf</code></pre>
<h2>Printing multiple notes</h2>
<p>Since v0.100.0, it is possible to print more than one note at the time
by using&nbsp;<a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>:</p>
<ol>
<li>First create a collection.</li>
<li>Configure it to use&nbsp;<a class="reference-link" href="#root/_help_mULW0Q3VojwY">List View</a>.</li>
<li
>Print the collection note normally.</li>
</ol>
<p>The resulting collection will contain all the children of the collection,
while maintaining the hierarchy.</p>
<aside class="admonition note">
<p>Not all note types are supported when printing or exporting to PDF. When
an unsupported note is encountered, it is skipped. At the end, if any of
the notes were skipped, a message will be displayed with the possibility
of viewing the full list of skipped notes. The same limitations as the
ones described in <em>Constraints &amp; limitations</em> apply.</p>
</aside>
<h2>Keyboard shortcut</h2>
<p>It's possible to trigger both printing and export as PDF from the keyboard
by going to&nbsp;<em>Keyboard shortcuts</em>&nbsp;in&nbsp;<a class="reference-link"
href="#root/_help_4TIF1oA4VQRO">Options</a>&nbsp;and assigning a key combination
for:</p>
<ul>
<li class="ck-list-marker-italic"><em>Print Active Note</em>
</li>
<li class="ck-list-marker-italic"><em>Export Active Note as PDF</em>
</li>
</ul>
<h2>Constraints &amp; limitations</h2>
<p>Not all&nbsp;<a class="reference-link" href="#root/_help_KSZ04uQ2D1St">Note Types</a>&nbsp;are
supported when printing, in which case the <em>Print</em> and <em>Export as PDF</em> options
will be disabled.</p>
<ul>
<li>For&nbsp;<a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;notes:
<ul>
<li>Line numbers are not printed.</li>
<li>Syntax highlighting is enabled, however a default theme (Visual Studio)
is enforced.</li>
</ul>
</li>
<li>For&nbsp;<a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>,
the following are supported:
<ul>
<li><a class="reference-link" href="#root/_help_mULW0Q3VojwY">List View</a>, allowing
to print multiple notes at once while preserving hierarchy (similar to
a book).</li>
<li><a class="reference-link" href="#root/_help_zP3PMqaG71Ct">Presentation</a>,
where each slide/sub-note is displayed.
<ul>
<li>Most note types are supported, especially the ones that have an image
representation such as&nbsp;<a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;and&nbsp;
<a
class="reference-link" href="#root/_help_gBbsAeiuUxI5">Mind Map</a>.</li>
</ul>
</li>
<li><a class="reference-link" href="#root/_help_2FvYrpmOXm29">Table</a>, where the
table is rendered in a print-friendly way.
<ul>
<li>Tables that are too complex (especially if they have multiple columns)
might not fit properly, however tables with a large number of rows are
supported thanks to pagination.</li>
<li>Consider printing in landscape mode, or using <code spellcheck="false">#printLandscape</code> if
exporting to PDF.</li>
</ul>
</li>
<li>The rest of the collections are not supported, but we plan to add support
for all the collection types at some point.</li>
</ul>
</li>
<li>Using&nbsp;<a class="reference-link" href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>&nbsp;for
printing is no longer supported, instead a custom <code spellcheck="false">printCss</code> relation
needs to be used (see below).</li>
</ul>
<h2>Customizing the print CSS</h2>
<p>As an advanced use case, it's possible to customize the CSS used for printing
such as adjusting the fonts, sizes or margins. Note that&nbsp;<a class="reference-link"
href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>&nbsp;will not work for
printing.</p>
<p>To do so:</p>
<ul>
<li>Create a CSS <a href="#root/_help_6f9hih2hXXZk">code note</a>.</li>
<li>On the note being printed, apply the <code spellcheck="false">~printCss</code> relation
to point to the newly created CSS code note.</li>
<li>To apply the CSS to multiple notes, consider using <a href="#root/_help_bwZpz2ajCEwO">inheritable attributes</a> or&nbsp;
<a
href="#root/_help_wy8So3yZZlH9">report the issue</a>. In this case, it's best to offer a sample note (click
on the
<img src="1_Printing & Exporting as PD.png"
width="29" height="31">button, select Export note → This note and all of its descendants → HTML
in ZIP archive). Make sure not to accidentally leak any personal information.</p>
<p>Consider adjusting font sizes and using <a href="#root/_help_CohkqWQC1iBv">page breaks</a> to
work around the layout.</p>
<h2>Exporting as PDF</h2>
<p>On the desktop application of Trilium it is possible to export a note
as PDF. On the server or PWA (mobile), the option is not available due
to technical constraints and it will be hidden.</p>
<p>To print a note, select the
<img src="1_Printing & Exporting as PD.png">button to the right of the note and select <em>Export as PDF</em>. Afterwards
you will be prompted to select where to save the PDF file.</p>
<aside class="admonition tip">
<p>Although direct export as PDF is not available in the browser version
of the application, it's still possible to generate a PDF by selecting
the <em>Print</em> option instead and selecting “Save to PDF” as the printer
(depending on the browser). Generally, Mozilla Firefox has better printing
capabilities.</p>
</aside>
<h3>Automatic opening of the file</h3>
<p>When the PDF is exported, it is automatically opened with the system default
application for easy preview.</p>
<p>Note that if you are using Linux with the GNOME desktop environment, sometimes
the default application might seem incorrect (such as opening in GIMP).
This is because it uses Gnome's “Recommended applications” list.</p>
<p>To solve this, you can change the recommended application for PDFs via
this command line. First, list the available applications via <code spellcheck="false">gio mime application/pdf</code> and
then set the desired one. For example to use GNOME's Evince:</p><pre><code class="language-text-x-trilium-auto">gio mime application/pdf</code></pre>
<h3>Customizing exporting as PDF</h3>
<p>When exporting to PDF, there are no customizable settings such as page
orientation, size. However, there are a few&nbsp;<a class="reference-link"
href="#root/_help_zEY4DaJG4YT5">Attributes</a>&nbsp;to adjust some of the settings:</p>
<ul>
<li>To print in landscape mode instead of portrait (useful for big diagrams
or slides), add <code spellcheck="false">#printLandscape</code>.</li>
<li>By default, the resulting PDF will be in Letter format. It is possible
to adjust it to another page size via the <code spellcheck="false">#printPageSize</code> attribute,
with one of the following values: <code spellcheck="false">A0</code>,
<code
spellcheck="false">A1</code>, <code spellcheck="false">A2</code>, <code spellcheck="false">A3</code>,
<code
spellcheck="false">A4</code>, <code spellcheck="false">A5</code>, <code spellcheck="false">A6</code>,
<code
spellcheck="false">Legal</code>, <code spellcheck="false">Letter</code>, <code spellcheck="false">Tabloid</code>,
<code
spellcheck="false">Ledger</code>.</li>
</ul>
<aside class="admonition note">
<p>These options have no effect when used with the printing feature, since
the user-defined settings are used instead.</p>
</aside>
<h2>Printing multiple notes</h2>
<p>Since v0.100.0, it is possible to print more than one note at the time
by using&nbsp;<a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>:</p>
<ol>
<li>First create a collection.</li>
<li>Configure it to use&nbsp;<a class="reference-link" href="#root/_help_mULW0Q3VojwY">List View</a>.</li>
<li>Print the collection note normally.</li>
</ol>
<p>The resulting collection will contain all the children of the collection,
while maintaining the hierarchy.</p>
<aside class="admonition note">
<p>Not all note types are supported when printing or exporting to PDF. When
an unsupported note is encountered, it is skipped. At the end, if any of
the notes were skipped, a message will be displayed with the possibility
of viewing the full list of skipped notes. The same limitations as the
ones described in <em>Constraints &amp; limitations</em> apply.</p>
</aside>
<h2>Keyboard shortcut</h2>
<p>It's possible to trigger both printing and export as PDF from the keyboard
by going to&nbsp;<em>Keyboard shortcuts</em>&nbsp;in&nbsp;<a class="reference-link"
href="#root/_help_4TIF1oA4VQRO">Options</a>&nbsp;and assigning a key combination
for:</p>
<ul>
<li><em>Print Active Note</em>
</li>
<li><em>Export Active Note as PDF</em>
</li>
</ul>
<h2>Constraints &amp; limitations</h2>
<p>Not all&nbsp;<a class="reference-link" href="#root/_help_KSZ04uQ2D1St">Note Types</a>&nbsp;are
supported when printing, in which case the <em>Print</em> and <em>Export as PDF</em> options
will be disabled.</p>
<ul>
<li>For&nbsp;<a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;notes:
<ul>
<li>Line numbers are not printed.</li>
<li>Syntax highlighting is enabled, however a default theme (Visual Studio)
is enforced.</li>
</ul>
</li>
<li>For&nbsp;<a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>,
the following are supported:
<ul>
<li><a class="reference-link" href="#root/_help_mULW0Q3VojwY">List View</a>, allowing
to print multiple notes at once while preserving hierarchy (similar to
a book).</li>
<li><a class="reference-link" href="#root/_help_zP3PMqaG71Ct">Presentation</a>,
where each slide/sub-note is displayed.
<ul>
<li>Most note types are supported, especially the ones that have an image
representation such as&nbsp;<a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;and&nbsp;
<a
class="reference-link" href="#root/_help_gBbsAeiuUxI5">Mind Map</a>.</li>
</ul>
</li>
<li><a class="reference-link" href="#root/_help_2FvYrpmOXm29">Table</a>, where the
table is rendered in a print-friendly way.
<ul>
<li>Tables that are too complex (especially if they have multiple columns)
might not fit properly, however tables with a large number of rows are
supported thanks to pagination.</li>
<li>Consider printing in landscape mode, or using <code spellcheck="false">#printLandscape</code> if
exporting to PDF.</li>
</ul>
</li>
<li>The rest of the collections are not supported, but we plan to add support
for all the collection types at some point.</li>
</ul>
</li>
<li>Using&nbsp;<a class="reference-link" href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>&nbsp;for
printing is no longer supported, instead a custom <code spellcheck="false">printCss</code> relation
needs to be used (see below).</li>
</ul>
<h2>Customizing the print CSS</h2>
<p>As an advanced use case, it's possible to customize the CSS used for printing
such as adjusting the fonts, sizes or margins. Note that&nbsp;<a class="reference-link"
href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>&nbsp;will not work for
printing.</p>
<p>To do so:</p>
<ul>
<li>Create a CSS <a href="#root/_help_6f9hih2hXXZk">code note</a>.</li>
<li>On the note being printed, apply the <code spellcheck="false">~printCss</code> relation
to point to the newly created CSS code note.</li>
<li>To apply the CSS to multiple notes, consider using <a href="#root/_help_bwZpz2ajCEwO">inheritable attributes</a> or&nbsp;
<a
class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>.</li>
</ul>
<p>For example, to change the font of the document from the one defined by
the theme or the user to a serif one:</p><pre><code class="language-text-x-trilium-auto">body{
class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>.</li>
</ul>
<p>For example, to change the font of the document from the one defined by
the theme or the user to a serif one:</p><pre><code class="language-text-x-trilium-auto">body{
--print-font-family: serif;
--print-font-size: 11pt;
}</code></pre>
<aside class="admonition important">
<p>When altering <code spellcheck="false">--print-font-family</code>, make
sure the change is done at <code spellcheck="false">body</code> level and
not <code spellcheck="false">:root</code>, since otherwise it won't be picked
up due to specificity rules.</p>
</aside>
<p>To remark:</p>
<ul>
<li>Multiple CSS notes can be add by using multiple <code spellcheck="false">~printCss</code> relations.</li>
<li>If the note pointing to the <code spellcheck="false">printCss</code> doesn't
have the right note type or mime type, it will be ignored.</li>
<aside class="admonition important">
<p>When altering <code spellcheck="false">--print-font-family</code>, make
sure the change is done at <code spellcheck="false">body</code> level and
not <code spellcheck="false">:root</code>, since otherwise it won't be picked
up due to specificity rules.</p>
</aside>
<p>To remark:</p>
<ul>
<li>Multiple CSS notes can be add by using multiple <code spellcheck="false">~printCss</code> relations.</li>
<li
>If the note pointing to the <code spellcheck="false">printCss</code> doesn't
have the right note type or mime type, it will be ignored.</li>
<li>If migrating from a previous version where&nbsp;<a class="reference-link"
href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>, there's no need for
<code
spellcheck="false">@media print {</code>since the style-sheet is used only for printing.</li>
</ul>
<h2>Under the hood</h2>
<p>Both printing and exporting as PDF use the same mechanism: a note is rendered
individually in a separate webpage that is then sent to the browser or
the Electron application either for printing or exporting as PDF.</p>
<p>The webpage that renders a single note can actually be accessed in a web
browser. For example <code spellcheck="false">http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk</code> becomes
<code
spellcheck="false">http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ</code>.</p>
<p>Accessing the print note in a web browser allows for easy debugging to
understand why a particular note doesn't render well. The mechanism for
rendering is similar to the one used in&nbsp;<a class="reference-link"
href="#root/_help_0ESUbbAxVnoK">Note List</a>.</p>
</ul>
<h2>Under the hood</h2>
<p>Both printing and exporting as PDF use the same mechanism: a note is rendered
individually in a separate webpage that is then sent to the browser or
the Electron application either for printing or exporting as PDF.</p>
<p>The webpage that renders a single note can actually be accessed in a web
browser. For example <code spellcheck="false">http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk</code> becomes
<code
spellcheck="false">http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ</code>.</p>
<p>Accessing the print note in a web browser allows for easy debugging to
understand why a particular note doesn't render well. The mechanism for
rendering is similar to the one used in&nbsp;<a class="reference-link"
href="#root/_help_0ESUbbAxVnoK">Note List</a>.</p>
<ol class="footnote-section footnotes"
data-footnote-section="" role="doc-endnotes">
<li class="footnote-item" data-footnote-item="" data-footnote-index="1"
data-footnote-id="sr779u3zm6" role="doc-endnote" id="fnsr779u3zm6"><span class="footnote-back-link" data-footnote-back-link="" data-footnote-id="sr779u3zm6"><sup><strong><a href="#fnrefsr779u3zm6">^</a></strong></sup></span>
<div
class="footnote-content" data-footnote-content="">
<p>&nbsp;</p>
</div>
</li>
</ol>

View File

@@ -54,7 +54,8 @@
hide the Mermaid source code and display the diagram preview in full-size.
In this case, the read-only mode can be easily toggled on or off via a
dedicated button in the&nbsp;<a class="reference-link" href="#root/_help_XpOYSgsLkTJy">Floating buttons</a>&nbsp;area.</li>
<li><a class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map View</a>&nbsp;will
<li
><a class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map</a>&nbsp;will
disallow all interaction that would otherwise change the map (dragging
notes, adding new items).</li>
</ul>

View File

@@ -4,15 +4,16 @@
<p>This can be useful for a few things:</p>
<ul>
<li>computer programmers can store code snippets as notes with syntax highlighting</li>
<li>JavaScript code notes can be executed inside Trilium for some extra functionality
<li
>JavaScript code notes can be executed inside Trilium for some extra functionality
<ul>
<li>we call such JavaScript code notes "scripts" - see&nbsp;<a class="reference-link"
href="#root/_help_CdNpE2pqjmI6">Scripting</a>
</li>
</ul>
</li>
<li>JSON, XML etc. can be used as storage for structured data (typically used
in conjunction with scripting)</li>
</li>
<li>JSON, XML etc. can be used as storage for structured data (typically used
in conjunction with scripting)</li>
</ul>
<p>For shorter snippets of code that can be embedded in&nbsp;<a href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes,
see&nbsp;<a href="#root/_help_QxEyIjRBizuC">Code blocks</a>.</p>
@@ -37,6 +38,54 @@
to manually <a href="#root/_help_s8alTXmpFR61">refresh the application</a>.</p>
<p>The list of languages is also shared with the&nbsp;<a href="#root/_help_QxEyIjRBizuC">Code blocks</a>&nbsp;feature
of&nbsp;<a href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes.</p>
<h2>Word wrap</h2>
<p>Long lines can be displayed on multiple lines:</p>
<ul>
<li>Globally for all code notes, from&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_4TIF1oA4VQRO">Options</a>&nbsp;<em>Code Notes.</em>
</li>
<li>For a particular note, by going to the menu in&nbsp;<a class="reference-link"
href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_8YBEPzcpUgxw">Note buttons</a>&nbsp;and
selecting <em>Word wrap</em> and selecting the appropriate option:
<ul>
<li><em>Auto</em>, to respect the global word wrap for code notes.</li>
<li
><em>On</em> or <em>Off</em>, to change the state of the word wrap for this
note regardless of the global option.</li>
</ul>
</li>
</ul>
<h2>Adjusting options using the status bar</h2>
<aside class="admonition note">
<p>This feature is only available for the&nbsp;<a class="reference-link"
href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_IjZS7iK5EXtb">New Layout</a>.
For the old layout, the tab width can be adjusted at note level using the
<code
spellcheck="false">#tabWidth</code>attribute, but re-indentation is not available.</p>
</aside>
<p>The status bar at the bottom of the editor shows the current indentation
settings and language. Clicking on the indentation indicator opens a menu
with three sections:</p>
<ol>
<li><strong>Indent Using</strong> — switch between Spaces and Tabs. If a per-note
override is active, a "Reset to default" option appears.</li>
<li><strong>Display Width</strong> — choose from preset widths (1, 2, 3, 4,
6, 8). Changes are saved as a per-note <code spellcheck="false">#tabWidth</code> label.</li>
<li
><strong>Re-indent Content To</strong> — convert existing indentation to
a different style. For example, re-indent a file from 4 spaces to 2 spaces,
or from spaces to tabs. This rewrites the leading whitespace on every line
while preserving alignment remainders.</li>
</ol>
<p>Clicking the language indicator lets you change the note's MIME type.</p>
<h3>Re-indentation</h3>
<p>When you re-indent content, the editor:</p>
<ul>
<li>Measures the visual column width of each line's leading whitespace using
the current style</li>
<li>Calculates indent levels and any alignment remainder</li>
<li>Rebuilds the leading whitespace in the target style</li>
<li>Preserves non-leading whitespace, blank lines, and content without indentation</li>
</ul>
<h2>Color schemes</h2>
<p>Since Trilium 0.94.0 the colors of code notes can be customized by going&nbsp;
<a

View File

@@ -62,8 +62,10 @@
<ul>
<li>It is possible to disable the syntax highlighting for all the notes by
selecting “No syntax highlighting” in the “Color scheme” option.</li>
<li>Word wrapping is disabled by default, but can be configured from the same
<li
>Word wrapping is disabled by default, but can be configured from the same
section.</li>
<li>The tab width can also be adjusted from Options.</li>
</ul>
<aside class="admonition note">
<p><strong>Context regarding syntax highlighting</strong>

View File

@@ -297,7 +297,8 @@
"migration": {
"old_version": "由您当前版本的直接迁移不被支持。请先升级到最新的 v0.60.4 然后再到这个版本。",
"error_message": "迁移到版本 {{version}} 时发生错误: {{stack}}",
"wrong_db_version": "数据库的版本({{version}})新于应用期望的版本({{targetVersion}}),这意味着它由一个更加新的且不兼容的 Trilium 所创建。升级到最新版的 Trilium 以解决此问题。"
"wrong_db_version": "数据库的版本({{version}})新于应用期望的版本({{targetVersion}}),这意味着它由一个更加新的且不兼容的 Trilium 所创建。升级到最新版的 Trilium 以解决此问题。",
"invalid_db_version": "数据库版本不是一个有效的数字。这通常表示数据库中的 'dbVersion' 选项已损坏。请从备份中恢复。"
},
"modals": {
"error_title": "错误"

View File

@@ -41,15 +41,15 @@
"open-new-window": "يېڭى كۆزنەك ئېچىش",
"toggle-tray": "سىستېما تەخسىسى سىنبەلگىسىنى كۆرسىتىش/يوشۇرۇش",
"first-tab": "بىرىنچى بەتكۈچكە ئالماشتۇرۇش",
"second-tab": "ئىككىنچى بەتكۈچكە ئالماشتۇرۇش",
"third-tab": "ئۈچىنچى بەتكۈچكە ئالماشتۇرۇش",
"fourth-tab": "تۆتىنچى بەتكۈچكە ئالماشتۇرۇش",
"fifth-tab": "بەشىنچى بەتكۈچكە ئالماشتۇرۇش",
"sixth-tab": "ئالتىنچى بەتكۈچكە ئالماشتۇرۇش",
"seventh-tab": "يەتتىنچى بەتكۈچكە ئالماشتۇرۇش",
"eight-tab": "سەككىزىنچى بەتكۈچكە ئالماشتۇرۇش",
"ninth-tab": "توققۇزىنچى بەتكۈچكە ئالماشتۇرۇش",
"last-tab": "ئەڭ ئاخىرقى بەتكۈچكە ئالماشتۇرۇش",
"second-tab": "تىزىملىكتىكى ئىككىنچى بەتكۈچكە ئالماشتۇرۇش",
"third-tab": "تىزىملىكتىكى ئۈچىنچى بەتكۈچنى ئاكتىپلاش",
"fourth-tab": ىزىملىكتىكى تۆتىنچى بەتكۈچكە ئالماشتۇرۇش",
"fifth-tab": "تىزىملىكتىكى بەشىنچى بەتكۈچكە ئالماشتۇرۇش",
"sixth-tab": "تىزىملىكتىكى ئالتىنچى بەتكۈچكە ئالماشتۇرۇش",
"seventh-tab": "تىزىملىكتىكى يەتتىنچى بەتكۈچكە ئالماشتۇرۇش",
"eight-tab": "تىزىملىكتىكى سەككىزىنچى بەتكۈچكە ئالماشتۇرۇش",
"ninth-tab": ىزىملىكتىكى توققۇزىنچى بەتكۈچكە ئالماشتۇرۇش",
"last-tab": "تىزىملىكتىكى ئەڭ ئاخىرقى بەتكۈچكە ئالماشتۇرۇش",
"dialogs": "سۆھبەت رامكىلىرى",
"show-note-source": "خاتىرە ئەسلى كودى سۆھبەت رامكىسىنى كۆرسىتىش",
"show-options": "تاللانما سۆھبەت رامكىسىنى كۆرسىتىش",
@@ -57,7 +57,7 @@
"show-recent-changes": "يېقىنقى ئۆزگىرىشلەر سۆھبەت رامكىسىنى كۆرسىتىش",
"show-sql-console": "SQL كونترول سۇپىسى سۆھبەت رامكىسىنى كۆرسىتىش",
"show-backend-log": "ئارقا سۇپا خاتىرىسى سۆھبەت رامكىسىنى كۆرسىتىش",
"show-help": "ياردەمنى كۆرسىتىش",
"show-help": "ئىچىگە ئورۇنلاشتۇرۇلغان ياردەمنى كۆرسىتىش",
"show-cheatsheet": "تېز كۇنۇپكا يېتەكچىسىنى كۆرسىتىش",
"text-note-operations": "تېكىستلىك خاتىرە مەشغۇلاتى",
"add-link-to-text": "تېكىستكە ئۇلانما قوشۇش سۆھبەت رامكىسىنى ئېچىش",
@@ -84,7 +84,7 @@
"unhoist": "خاتىرىنى يۇقىرى كۆتۈرۈشتىن ۋاز كېچىش",
"reload-frontend-app": "ئالدى تەرەپ ئەپىنى قايتا يۈكلەش",
"open-dev-tools": "تەتقىقاتچى قوراللىرىنى ئېچىش",
"find-in-text": "تېكىست ئىچىدىن ئىزدەش",
"find-in-text": "ئىزدەش تاختىسىنى ئېچىش-تاقاش",
"toggle-left-note-tree-panel": "سول تەرەپ (خاتىرە دەرىخى) تاختىسىنى ئالماشتۇرۇش",
"toggle-full-screen": "پۈتۈن ئېكران شەكلىگە ئالماشتۇرۇش",
"zoom-out": "كىچىكلىتىش",
@@ -92,6 +92,95 @@
"note-navigation": "خاتىرە يولباشچىسى",
"reset-zoom-level": "چوڭ-كىچىكلىك دەرىجىسىنى ئەسلىگە كەلتۈرۈش",
"copy-without-formatting": "تاللانغان تېكىستنى فارماٹسىز كۆچۈرۈش",
"force-save-revision": "نۆۋەتتىكى خاتىرىنىڭ يېڭى نەشرىنى مەجبۇرىي قۇرۇش/ساقلاش"
"force-save-revision": "نۆۋەتتىكى خاتىرىنىڭ يېڭى نەشرىنى مەجبۇرىي قۇرۇش/ساقلاش",
"toggle-book-properties": "كىتاب خاسلىقىنى ئالماشتۇرۇش",
"toggle-classic-editor-toolbar": "تەھرىرلىگۈچنىڭ بەت كۆزنىكىدىكى مۇقىملاشتۇرۇلغان قورال ستونىنى ئالماشتۇرۇش",
"export-as-pdf": "نۆۋەتتىكى خاتىرىنى PDF شەكلىدە چىقىرىش",
"toggle-zen-mode": "زېن ھالىتىنى قوزغىتىش/چەكلەش (زېھنىنى يىغىپ تەھرىرلەش ئۈچۈن كۆرۈنمە يۈزىنى ئاددىيلاشتۇرۇش)",
"toggle-basic-properties": "ئاساسىي خاسلىقنى ئالماشتۇرۇش",
"toggle-file-properties": "ھۆججەت خاسلىقىنى ئالماشتۇرۇش",
"toggle-image-properties": "رەسىم خاسلىقىنى ئالماشتۇرۇش",
"toggle-owned-attributes": "ئىگىدارلىق خاسلىقىنى ئالماشتۇرۇش",
"toggle-inherited-attributes": "ۋارىسلىق قىلىنغان خاسلىقنى ئالماشتۇرۇش",
"toggle-promoted-attributes": "يۇقىرى كۆتۈرۈلگەن خاسلىقنى ئالماشتۇرۇش",
"render-active-note": "نۆۋەتتىكى خاتىرىنى رېندېرلاش (قايتا رېندېرلاش)"
},
"keyboard_action_names": {
"back-in-note-history": "خاتىرە تارىخىغا قايتىش",
"forward-in-note-history": "خاتىرە تارىخىدا ئالغا كۆچۈش",
"jump-to-note": "بۇنىڭغا ئاتلاش...",
"command-palette": "بۇيرۇق تاختىسى",
"scroll-to-active-note": "نۆۋەتتىكى خاتىرىگە سىيرىش",
"quick-search": "تېز ئىزدەش",
"search-in-subtree": "تارماق دەرەختىن ئىزدەش",
"expand-subtree": "تارماق دەرەخنى يېيىش",
"collapse-tree": "پۈتۈن دەرەخنى يىغىش",
"collapse-subtree": "تارماق دەرەخنى يىغىش",
"sort-child-notes": "تارماق خاتىرىلەرنى تەرتىپلەش",
"create-note-after": "كەينىگە خاتىرە قۇرۇش",
"create-note-into": "خاتىرە قۇرۇش ئورنى",
"create-note-into-inbox": "خاتىرىنى Inbox ساندۇقىغا قۇرۇش",
"delete-notes": "خاتىرىنى ئۆچۈرۈش",
"move-note-up": "خاتىرىنى يۇقىرىغا يۆتكەش",
"move-note-down": "خاتىرىنى تۆۋەنگە يۆتكەش",
"move-note-up-in-hierarchy": "خاتىرىنى قاتلامدا يۇقىرىغا يۆتكەش",
"move-note-down-in-hierarchy": "خاتىرىنى قاتلامدا تۆۋەنگە يۆتكەش",
"edit-note-title": "خاتىرە ماۋزۇسىنى تەھرىرلەش",
"edit-branch-prefix": "شاخ پېشالامىتىنى تەھرىرلەش",
"clone-notes-to": "خاتىرىنى كۆچۈرۈش ئورنى",
"move-notes-to": "خاتىرىنى يۆتكەش ئورنى",
"copy-notes-to-clipboard": "خاتىرىنى چاپلاش تاختىسىغا كۆچۈرۈش",
"paste-notes-from-clipboard": "خاتىرىنى چاپلاش تاختىسىدىن چاپلاش",
"cut-notes-to-clipboard": "خاتىرىنى چاپلاش تاختىسىغا كېسىش",
"select-all-notes-in-parent": "تۈپ خاتىرىدىكى بارلىق خاتىرىلەرنى تاللاش",
"add-note-above-to-selection": "يۇقىرىدىكى خاتىرىنى تاللانغانلارغا قوشۇش",
"add-note-below-to-selection": "تۆۋەندىكى خاتىرىنى تاللانغانلارغا قوشۇش",
"duplicate-subtree": "تارماق شاخنى كۆچۈرۈش",
"open-new-tab": "يېڭى بەتنى ئېچىش",
"close-active-tab": "نۆۋەتتىكى بەتكۈچنى يېپىش",
"reopen-last-tab": "ئەڭ ئاخىرىدا يېپىلغان بەتكۈچنى قايتا ئېچىش",
"activate-next-tab": "كېيىنكى بەتكۈچنى ئاكتىپلاش",
"activate-previous-tab": "ئالدىنقى بەتكۈچنى ئاكتىپلاش",
"open-new-window": "يېڭى كۆزنەك ئېچىش",
"toggle-system-tray-icon": "سىستېما تەخسىسى Icon بەلگىسىنى كۆرسىتىش/يوشۇرۇش",
"toggle-zen-mode": "زېن ھالەت قوزغىتىش/چەكلەش",
"switch-to-first-tab": "بىرىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-second-tab": "ئىككىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-third-tab": "ئۈچىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-fourth-tab": "تۆتىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-fifth-tab": "بەشىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-sixth-tab": "ئالتىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-seventh-tab": "يەتتىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-eighth-tab": "سەككىزىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-ninth-tab": "توققۇزىنچى بەتكۈچكە ئالماشتۇرۇش",
"switch-to-last-tab": "ئەڭ ئاخىرقى بەتكۈچكە ئالماشتۇرۇش",
"show-note-source": "خاتىرە مەنبە كودىنى كۆرسىتىش",
"show-options": "تاللانمىلارنى كۆرسىتىش",
"show-revisions": "تۈزىتىش خاتىرىسىنى كۆرسىتىش",
"show-recent-changes": "يېقىنقى ئۆزگىرىشلەرنى كۆرسىتىش",
"show-sql-console": "SQL كونترول سۇپىسىنى كۆرسىتىش",
"show-backend-log": "ئارقا سۇپا خاتىرىسى",
"show-help": "ياردەمنى كۆرسىتىش",
"show-cheatsheet": "تېز كۇنۇپكا جەدۋىلىنى كۆرسىتىش",
"add-link-to-text": "تېكىستكە ئۇلانما قوشۇش",
"follow-link-under-cursor": "كۆرسەتكۈچ ئاستىدىكى ئۇلانماغا ئەگىشىش",
"insert-date-and-time-to-text": "تېكىستكە چېسلا ۋە ۋاقىتنى قىستۇرۇش",
"paste-markdown-into-text": "تېكىستكە Markdown نى چاپلاش",
"cut-into-note": "خاتىرىگە كېسىپ چاپلاش",
"add-include-note-to-text": "تېكىستكە ئۆز ئىچىگە ئالغان خاتىرەنى قوشۇش",
"edit-read-only-note": "پەقەت ئوقۇشقىلا بولىدىغان خاتىرىنى تەھرىرلەش",
"add-new-label": "يېڭى بەلگە قوشۇش",
"add-new-relation": "يېڭى مۇناسىۋەت قوشۇش",
"toggle-ribbon-tab-classic-editor": "كلاسسىك تەھرىرلىگۈچنى قوزغىتىش/تاقاش",
"toggle-right-pane": "ئوڭ تەرەپتىكى كۆزنەكچىنى ئالماشتۇرۇش",
"print-active-note": "ئاكتىپ خاتىرىنى بېسىپ چىقىرىش",
"export-active-note-as-pdf": "ئاكتىپ خاتىرىنى PDF شەكلىدە چىقىرىش",
"open-note-externally": "خاتىرىنى سىرتقى پروگراممىدا ئېچىش",
"run-active-note": "نۆۋەتتىكى خاتىرىنى ئىجرا قىلىش",
"toggle-note-hoisting": "خاتىرىنى يۇقىرىغا كۆتۈرۈش",
"unhoist-note": "خاتىرىنى يۇقىرىغا كۆتۈرۈشنى ئەمەلدىن قالدۇرۇش",
"reload-frontend-app": "ئالدى ئەپىنى قايتا يۈكلەش",
"open-developer-tools": "تەتقىق قىلغۇچى قوراللىرىنى ئېچىش",
"find-in-text": "تېكىست ئىچىدىن ئىزدەش"
}
}

View File

@@ -6,7 +6,7 @@ import { MAX_MIGRATION_VERSION } from "../migrations/migrations.js";
import build from "./build.js";
import dataDir from "./data_dir.js";
const SYNC_VERSION = 38;
const SYNC_VERSION = 39;
const CLIPPER_PROTOCOL_VERSION = "1.0";
export default {

View File

@@ -1,25 +1,19 @@
import { parseExcel } from 'officeparser/dist/parsers/ExcelParser.js';
import { parseOpenOffice } from 'officeparser/dist/parsers/OpenOfficeParser.js';
import { parsePowerPoint } from 'officeparser/dist/parsers/PowerPointParser.js';
import { parseWord } from 'officeparser/dist/parsers/WordParser.js';
import type { OfficeParserConfig } from 'officeparser/dist/types.js';
import { OfficeParser, type OfficeParserConfig } from 'officeparser';
import log from '../../log.js';
import { OCRProcessingOptions, OCRResult } from '../ocr_service.js';
import { FileProcessor } from './file_processor.js';
type Parser = (buffer: Buffer, config: OfficeParserConfig) => Promise<{ toText(): string }>;
const PARSER_BY_MIME: Record<string, Parser> = {
const SUPPORTED_MIME_TYPES = new Set([
// Office Open XML
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': parseWord,
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': parseExcel,
'application/vnd.openxmlformats-officedocument.presentationml.presentation': parsePowerPoint,
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
// OpenDocument
'application/vnd.oasis.opendocument.text': parseOpenOffice,
'application/vnd.oasis.opendocument.spreadsheet': parseOpenOffice,
'application/vnd.oasis.opendocument.presentation': parseOpenOffice
};
'application/vnd.oasis.opendocument.text',
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.oasis.opendocument.presentation'
]);
const PARSER_CONFIG: OfficeParserConfig = {
outputErrorToConsole: false,
@@ -30,28 +24,27 @@ const PARSER_CONFIG: OfficeParserConfig = {
/**
* Office document processor for extracting text from DOCX/XLSX/PPTX and ODT/ODS/ODP files.
* Uses individual parsers from officeparser v6 to avoid pulling in pdfjs-dist.
* Uses officeparser's main API, which auto-detects the format from the buffer's magic bytes.
*/
export class OfficeProcessor extends FileProcessor {
canProcess(mimeType: string): boolean {
return mimeType in PARSER_BY_MIME;
return SUPPORTED_MIME_TYPES.has(mimeType);
}
getSupportedMimeTypes(): string[] {
return Object.keys(PARSER_BY_MIME);
return [...SUPPORTED_MIME_TYPES];
}
async extractText(buffer: Buffer, options: OCRProcessingOptions = {}): Promise<OCRResult> {
const mimeType = options.mimeType;
if (!mimeType || !(mimeType in PARSER_BY_MIME)) {
if (!mimeType || !SUPPORTED_MIME_TYPES.has(mimeType)) {
throw new Error(`Unsupported MIME type for Office processor: ${mimeType}`);
}
log.info(`Starting Office document text extraction for ${mimeType}...`);
const parse = PARSER_BY_MIME[mimeType];
const ast = await parse(buffer, PARSER_CONFIG);
const ast = await OfficeParser.parseOffice(buffer, PARSER_CONFIG);
const trimmed = ast.toText().trim();
return {

View File

@@ -162,17 +162,23 @@
"description_x64": "كۆپىنچە Linux تارقاتما نۇسخىلىرىغا ماس كېلىدۇ، x86_64 ئارخىتېكتۇرىسى بىلەن ماسلىشىشچانلىقى بار.",
"description_arm64": "ARM ئارخىتېكتۇرىسىنى ئاساس قىلغان Linux تارقاتما نۇسخىلىرىغا ماس كېلىدۇ، aarch64 ئارخىتېكتۇرىسى بىلەن ماسلىشىشچانلىقى بار.",
"quick_start": "ئۆزىڭىز ئىشلىتىۋاتقان تارقاتما نۇسخاغا ئاساسەن مۇۋاپىق بولغان يۇمشاق دېتال فورماتىنى تاللاڭ:",
"download_deb": ".deb"
"download_deb": ".deb",
"download_rpm": ".rpm",
"download_zip": "Portable (.zip)",
"download_nixpkgs": "nixpkgs"
},
"download_helper_desktop_macos": {
"description_x64": "macOS Monterey ياكى ئۇنىڭدىن كېيىنكى سىستېما ئىجرا قىلىنىدىغان Intel يادرولۇق Mac كومپيۇتېرلىرىغا ماس كېلىدۇ.",
"description_arm64": "M1 ۋە M2 ئۆزەكلىرى سەپلەنگەن Apple Silicon Mac كومپيۇتېرلىرىغا ماس كېلىدۇ.",
"quick_start": "Homebrew ئارقىلىق قاچىلاش:",
"download_dmg": "قاچىلاش پروگراممىسىنى چۈشۈرۈش (.dmg)"
"download_dmg": "قاچىلاش پروگراممىسىنى چۈشۈرۈش (.dmg)",
"title_x64": "Intel بىر تەرەپ قىلغۇچلىرىغا ماس كېلىدىغان macOS",
"title_arm64": "Apple Silicon (ئالما ئۆزەكلىرى) گە ماس كېلىدىغان macOS"
},
"download_helper_server_docker": {
"title": "Docker ئارقىلىق ئۆزىڭىز قۇرۇپ ئىشلىتىش (Self-hosted)",
"description": "Docker كونتېينېرى (Container) ئارقىلىق Windows، Linux ياكى macOS سىستېمىلىرىغا ئاسانلا ئورۇنلاشتۇرۇشقا بولىدۇ."
"description": "Docker كونتېينېرى (Container) ئارقىلىق Windows، Linux ياكى macOS سىستېمىلىرىغا ئاسانلا ئورۇنلاشتۇرۇشقا بولىدۇ.",
"download_dockerhub": "Docker Hub"
},
"download_helper_server_linux": {
"title": "Linuxدا ئۆزىڭىز قۇرۇپ ئىشلىتىش (Self-hosted)",
@@ -181,9 +187,12 @@
"download_helper_server_hosted": {
"description": "Trilium Notes نىڭ بېكەت تۇرالغۇسى PikaPods تەرىپىدىن تەمىنلىنىدۇ، بۇ ھەقلىق مۇلازىمەت قولايلىق زىيارەت ۋە باشقۇرۇش ئىقتىدارلىرىغا ئىگە. مەزكۇر مۇلازىمەت بىلەن Trilium گۇرۇپپىسى ئوتتۇرىسىدا بىۋاسىتە باغلىنىش يوق.",
"download_pikapod": "PikaPods تا تەڭشەش",
"download_triliumcc": "يەنە trilium.cc غا كىرسىڭىزمۇ بولىدۇ"
"download_triliumcc": "يەنە trilium.cc غا كىرسىڭىزمۇ بولىدۇ",
"title": "ھەقلىق مۇلازىمەت بىلەن تەمىنلەش"
},
"resources": {
"title": "مەنبەلەر"
"title": "مەنبەلەر",
"download": "چۈشۈرۈش",
"website": "تور بېكەت"
}
}

View File

@@ -1,5 +1,5 @@
# Documentation
There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/88cjtiwxfR49/Documentation_image.png" width="205" height="162">
There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/HWpeC3cnbb1K/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.

83
docs/README-ug.md vendored
View File

@@ -192,8 +192,8 @@ zadam/Trilium نۇسخىسىدىن TriliumNext/Notes غا كۆچۈش ئۈچۈن
ئەگەر سىز ئىشلىتىۋاتقان نەشرى تۆۋەندىكى جەدۋەلدە بولسا، شۇ نەشرىنىڭ يۇمشاق دېتال
بوغچىسىنى ئىشلىتىڭ.
[![Packaging
status](https://repology.org/badge/vertical-allrepos/triliumnext.svg)](https://repology.org/project/triliumnext/versions)
[![بوغچىلاش
ھالىتى](https://repology.org/badge/vertical-allrepos/triliumnext.svg)](https://repology.org/project/triliumnext/versions)
سىز يەنە [ئەڭ يېڭى ئېلان قىلىنغان
بەت](https://github.com/TriliumNext/Trilium/releases/latest)تىن مۇناسىپ سۇپىنىڭ
@@ -203,7 +203,7 @@ status](https://repology.org/badge/vertical-allrepos/triliumnext.svg)](https://r
TriliumNext يەنە Flatpak نۇسخىسى بىلەن تەمىنلەيدۇ، ئەمما تېخى FlatHub غا
چىقىرىلمىدى.
### Browser (any OS)
### Browser (ھەرقانداق مەشغۇلات سىستېمىسى)
ئەگەر سىزدە (تۆۋەندىكىدەك) مۇلازىمىتىر قاچىلانمىسى بولسا، تور كۆرۈنمە يۈزىنى
بىۋاسىتە ساقىلالايسىز (ئۇ بىر تەرەپ قىلغۇچ دېتالى بىلەن ئاساسەن ئوخشاش)
@@ -211,7 +211,7 @@ TriliumNext يەنە Flatpak نۇسخىسى بىلەن تەمىنلەيدۇ، ئ
نۆۋەتتە پەقەت Chrome ۋە Firefox نىڭ ئەڭ يېڭى نەشرىنىلا قوللايدۇ (ھەمدە ئەمەلىي
سىناقتىن ئۆتكەن).
### Mobile
### كۆچمە ئۈسكۈنە
ئەگەر كۆچمە ئۈسكۈنىلەردە TriliumNext نى ئىشلەتمەكچى بولسىڭىز، كۆچمە كۆرگۈچ
ئارقىلىق مۇلازىمىتىرغا قاچىلانغان كۆچمە نۇسخا كۆرۈنمە يۈزىنى زىيارەت قىلالايسىز
@@ -269,7 +269,7 @@ pnpm install
pnpm edit-docs:edit-docs
```
### Building the Executable
### ئىجرا قىلىنىدىغان ھۆججەتنى قۇرۇش
ئامبارنى چۈشۈرۈڭ، `pnpm` ئارقىلىق بېقىندى زاپچاسلارنى قاچىلاڭ، ئاندىن Windows
ئۈچۈن ئۈستەلئۈستى ئەپىنى قۇرۇپ چىقىڭ:
```shell
@@ -303,49 +303,54 @@ pnpm run --filter desktop electron-forge:make --arch=x64 --platform=win32
[antoniotejada](https://github.com/nriver).
* GitHub مەسىلىلىرى ۋە مۇنازىرىلىرىگە ئاپتوماتىك جاۋاب قايتۇرۇش بىلەن تەمىنلىگەن
[Dosu](https://dosu.dev/).
* [Tabler Icons](https://tabler.io/icons) for the system tray icons.
* سىستېما تەخسىسى سىنبەلگىسى ئۈچۈن [Tabler Icons](https://tabler.io/icons)
ئىشلىتىلدى.
Trilium would not be possible without the technologies behind it:
ئارقا سەپتىكى تېخنىكىلارنىڭ قوللىشى بولمىسا، Trilium تۈرىنى ئەمەلگە ئاشۇرغىلى
بولمايتتى:
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - the visual editor behind
text notes. We are grateful for being offered a set of the premium features.
* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with
support for huge amount of languages.
* [Excalidraw](https://github.com/excalidraw/excalidraw) - the infinite
whiteboard used in Canvas notes.
* [Mind Elixir](https://github.com/SSShooter/mind-elixir-core) - providing the
mind map functionality.
* [Leaflet](https://github.com/Leaflet/Leaflet) - for rendering geographical
maps.
* [Tabulator](https://github.com/olifolkerd/tabulator) - for the interactive
table used in collections.
* [FancyTree](https://github.com/mar10/fancytree) - feature-rich tree library
without real competition.
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library.
Used in [relation
maps](https://docs.triliumnotes.org/user-guide/note-types/relation-map) and
[link
maps](https://docs.triliumnotes.org/user-guide/advanced-usage/note-map#link-map)
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) —— تېكىستلىك خاتىرىلەرنىڭ
ئارقا سىپىدىكى كۆرۈنۈشچان تەھرىرلىگۈچ. بىز بۇ يۇقىرى دەرىجىلىك ئىقتىدارلارنى
ئىشلىتىش ھوقۇقىغا ئېرىشكەنلىكىمىزدىن تولىمۇ مىننەتدارمىز.
* [CodeMirror](https://github.com/codemirror/CodeMirror) —— كۆپلىگەن پروگرامما
تىللىرىنى قوللايدىغان كود تەھرىرلىگۈچ.
* [Excalidraw](https://github.com/excalidraw/excalidraw) —— (Canvas) خاتىرىسىدە
ئىشلىتىلىدىغان چەكسىز ئاق دوسكا.
* [Mind Elixir](https://github.com/SSShooter/mind-elixir-core) —— تەپەككۇر
خەرىتىسى ئىقتىدارى بىلەن تەمىنلەيدۇ.
* [Leaflet](https://github.com/Leaflet/Leaflet) —— جۇغراپىيەلىك خەرىتىلەرنى
تەسۋىرلەش (Render) ئۈچۈن ئىشلىتىلىدۇ.
* [Tabulator](https://github.com/olifolkerd/tabulator) —— توپلاملاردىكى ئۆزئارا
تەسىرلىشىدىغان جەدۋەللەر ئۈچۈن ئىشلىتىلىدۇ.
* [FancyTree](https://github.com/mar10/fancytree) —— ئىقتىدارى مول بولغان
دەرەخسىمان كونترول كۇتۇپخانىسى، ئۇنىڭغا تەڭ كېلىدىغان باشقا بىر كۇتۇپخانا يوق.
* [jsPlumb](https://github.com/jsplumb/jsplumb) —— كۆرۈنۈشچان ئۇلىنىش
كۇتۇپخانىسى. مۇناسىۋەت خەرىتىسى
(https://docs.triliumnotes.org/user-guide/note-types/relation-map) ۋە ئۇلىنىش
خەرىتىسى
(https://docs.triliumnotes.org/user-guide/advanced-usage/note-map#link-map)
ئۈچۈن ئىشلىتىلىدۇ.
## 🤝 Support
## 🤝 بىزنى قوللاش
Trilium is built and maintained with [hundreds of hours of
work](https://github.com/TriliumNext/Trilium/graphs/commit-activity). Your
support keeps it open-source, improves features, and covers costs such as
hosting.
Trilium نى ئېچىش ۋە ئاسراشقا [يۈزلىگەن سائەت
خىزمەت](https://github.com/TriliumNext/Trilium/graphs/commit-activity)
سىڭدۈرۈلگەن. سىزنىڭ قوللىشىڭىز ئۇنىڭ ئوچۇق كودلۇق خاراكتېرىگە كاپالەتلىك قىلىدۇ،
ئىقتىدارلىرىنىڭ ياخشىلىنىشىنى ئىلگىرى سۈرىدۇ ھەمدە مۇلازىمېتىر تەننەرخى قاتارلىق
چىقىملارنى قامدايدۇ.
Consider supporting the main developer
([eliandoran](https://github.com/eliandoran)) of the application via:
تۆۋەندىكى ئۇسۇللار ئارقىلىق بۇ ئەپنىڭ ئاساسلىق ئاچقۇچىسى
([eliandoran](https://github.com/eliandoran)) نى قوللاشنى ئويلىشىپ كۆرۈڭ:
- [GitHub Sponsors](https://github.com/sponsors/eliandoran)
- [PayPal](https://paypal.me/eliandoran)
- [Buy Me a Coffee](https://buymeacoffee.com/eliandoran)
## 🔑 License
## 🔑 ئىجازەتنامە شەرتلىرى
Copyright 2017-2025 zadam, Elian Doran, and other contributors
نەشر ھوقۇقى 20172025 zadam، Elian Doran ۋە باشقا تۆھپىكارلارغا تەۋە
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
بۇ پىروگرامما ئەركىن يۇمشاق دېتال: سىز ئەركىن يۇمشاق دېتال فوندى جەمئىيىتى (Free
Software Foundation) ئېلان قىلغان GNU Affero ئومۇمىي ئاممىۋى ئىجازەتنامىسى (GNU
AGPL) نىڭ 3-نەشرى ياكى (تاللىشىڭىزغا ئاساسەن) ھەر قانداق كېيىنكى نەشرىنىڭ
شەرتلىرىگە ئاساسەن، بۇ پىروگراممىنى قايتا تارقىتسىڭىز ياكى ئۆزگەرتسىڭىز بولىدۇ.

View File

@@ -4522,10 +4522,52 @@
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"value": "IjZS7iK5EXtb",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "8YBEPzcpUgxw",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "A9Oc6YKKc65v",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "F1r9QtzQLZqm",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "pgxEVkzLl1OP",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "GBBMSlVSOIGP",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 70
},
{
"type": "label",
"name": "shareAlias",
@@ -4539,48 +4581,6 @@
"value": "bx bx-history",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "IjZS7iK5EXtb",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "8YBEPzcpUgxw",
"isInheritable": false,
"position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "pgxEVkzLl1OP",
"isInheritable": false,
"position": 70
},
{
"type": "relation",
"name": "internalLink",
"value": "GBBMSlVSOIGP",
"isInheritable": false,
"position": 80
},
{
"type": "relation",
"name": "internalLink",
"value": "A9Oc6YKKc65v",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
"value": "F1r9QtzQLZqm",
"isInheritable": false,
"position": 100
}
],
"format": "markdown",
@@ -4691,13 +4691,6 @@
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
@@ -4802,13 +4795,41 @@
"value": "printing-and-pdf-export",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
"value": "8YBEPzcpUgxw",
"isInheritable": false,
"position": 170
},
{
"type": "relation",
"name": "internalLink",
"value": "A9Oc6YKKc65v",
"isInheritable": false,
"position": 180
},
{
"type": "relation",
"name": "internalLink",
"value": "F1r9QtzQLZqm",
"isInheritable": false,
"position": 190
},
{
"type": "relation",
"name": "internalLink",
"value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 200
}
],
"format": "markdown",
"dataFileName": "Printing & Exporting as PDF.md",
"attachments": [
{
"attachmentId": "NfSjRsArIQHy",
"attachmentId": "Om2EmdZr54vy",
"title": "image.png",
"role": "image",
"mime": "image/png",
@@ -4816,7 +4837,7 @@
"dataFileName": "Printing & Exporting as PD.png"
},
{
"attachmentId": "Om2EmdZr54vy",
"attachmentId": "V7LPRqK96Vjy",
"title": "image.png",
"role": "image",
"mime": "image/png",
@@ -5228,7 +5249,7 @@
"wArbEsdSae6g",
"F1r9QtzQLZqm"
],
"title": "Jump to...",
"title": "Jump to & command palette",
"notePosition": 50,
"prefix": null,
"isExpanded": false,
@@ -5265,7 +5286,7 @@
}
],
"format": "markdown",
"dataFileName": "Jump to.md",
"dataFileName": "Jump to & command palette.md",
"attachments": [
{
"attachmentId": "7IU5WrneDsfi",
@@ -5273,7 +5294,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "Jump to_image.png"
"dataFileName": "Jump to & command palette_.png"
},
{
"attachmentId": "P9veX5eFZdPp",
@@ -5281,7 +5302,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "1_Jump to_image.png"
"dataFileName": "1_Jump to & command palette_.png"
},
{
"attachmentId": "y8yxomaf1Gkz",
@@ -5289,7 +5310,7 @@
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "2_Jump to_image.png"
"dataFileName": "2_Jump to & command palette_.png"
}
]
},
@@ -9856,6 +9877,20 @@
"value": "bx bx-code",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
"value": "8YBEPzcpUgxw",
"isInheritable": false,
"position": 100
},
{
"type": "relation",
"name": "internalLink",
"value": "IjZS7iK5EXtb",
"isInheritable": false,
"position": 110
}
],
"format": "markdown",

View File

@@ -1,5 +1,5 @@
# Jump to...
<figure class="image image-style-align-center"><img style="aspect-ratio:991/403;" src="1_Jump to_image.png" width="991" height="403"></figure>
# Jump to & command palette
<figure class="image image-style-align-center"><img style="aspect-ratio:991/403;" src="1_Jump to &amp; command palette_.png" width="991" height="403"></figure>
## Jump to Note
@@ -7,7 +7,7 @@ The _Jump to Note_ function allows easy navigation between notes by searching fo
To enter the “Jump to” dialog:
* In the <a class="reference-link" href="../UI%20Elements/Launch%20Bar.md">Launch Bar</a>, press ![](2_Jump%20to_image.png) button.
* In the <a class="reference-link" href="../UI%20Elements/Launch%20Bar.md">Launch Bar</a>, press ![](2_Jump%20to%20&%20command%20palette_.png) button.
* Using the keyboard, press <kbd>Ctrl</kbd> + <kbd>J</kbd>.
In addition to searching for notes, it is also possible to search for commands. See the dedicated section below for more information.
@@ -28,7 +28,7 @@ Alternatively you can click on the "time" icon on the right.
## Command Palette
<figure class="image image-style-align-center"><img style="aspect-ratio:982/524;" src="Jump to_image.png" width="982" height="524"></figure>
<figure class="image image-style-align-center"><img style="aspect-ratio:982/524;" src="Jump to &amp; command palette_.png" width="982" height="524"></figure>
The command palette is a feature which allows easy execution of various commands that can be found throughout the application, such as from menus or keyboard shortcuts. This feature integrates directly into the “Jump to” dialog.

View File

@@ -13,4 +13,4 @@ This works identically to browser backwards / forwards, it's actually using buil
This is useful to quickly find and view arbitrary notes - click on `Jump to` button on the top or press <kbd>Ctrl</kbd> + <kbd>J</kbd> . Then type part of the note name and autocomplete will help you pick the desired note.
See <a class="reference-link" href="Jump%20to.md">Jump to Note</a> for more information.
See <a class="reference-link" href="Jump%20to%20%26%20command%20palette.md">Jump to Note</a> for more information.

View File

@@ -5,7 +5,7 @@ The _Quick search_ function does a full-text search (that is, it searches throug
The alternative to the quick search is the <a class="reference-link" href="Search.md">Search</a> function, which opens in a dedicated tab and has support for advanced queries.
For even faster navigation, it's possible to use <a class="reference-link" href="Jump%20to.md">Jump to...</a> which will only search through the note titles instead of the content.
For even faster navigation, it's possible to use <a class="reference-link" href="Jump%20to%20%26%20command%20palette.md">Jump to...</a> which will only search through the note titles instead of the content.
## Layout

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 243 KiB

View File

@@ -40,7 +40,7 @@ In the list of note revisions:
To create a named revision, either:
* Go to the <a class="reference-link" href="../UI%20Elements/Note%20buttons.md">Note buttons</a>, select _Save named revision…_, enter the name of revision and confirm.
* Use the corresponding [keyboard shortcut](../Keyboard%20Shortcuts.md) or the <a class="reference-link" href="../Navigation/Jump%20to.md">Jump to...</a> command with the same name.
* Use the corresponding [keyboard shortcut](../Keyboard%20Shortcuts.md) or the <a class="reference-link" href="../Navigation/Jump%20to%20%26%20command%20palette.md">Jump to...</a> command with the same name.
* Save a revision normally, and adjust the name afterwards from the note revision list.
## When revisions are saved

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 150 B

View File

@@ -1,29 +1,60 @@
# Printing & Exporting as PDF
<figure class="image"><img style="aspect-ratio:951/432;" src="Printing &amp; Exporting as PD.png" width="951" height="432"><figcaption>Screenshot of the note contextual menu indicating the “Export as PDF” option.</figcaption></figure>
<figure class="image"><img style="aspect-ratio:2023/1488;" src="1_Printing &amp; Exporting as PD.png" width="2023" height="1488"><figcaption>Screenshot of the Print preview functionality introduced in v0.103.0.</figcaption></figure>
## Printing
This feature allows printing of notes. It works on both the desktop client, but also on the web.
Trilium allows printing notes to a real printer, or generating a structured PDF for a single note or for multiple notes through <a class="reference-link" href="../../Collections.md">Collections</a>.
Note that not all note types are printable as of now. We do plan to increase the coverage of supported note types in the future.
To print a note, select the <img src="1_Printing &amp; Exporting as PD.png" width="29" height="31"> button to the right of the note and select _Print note_. Depending on the size and type of the note, this can take up to a few seconds. Afterwards you will be redirected to the system/browser printing dialog.
Printing and exporting as PDF are not perfect. Due to technical limitations, and sometimes even browser or Electron glitches the text might appear cut off in some circumstances. 
## Printing a note or exporting as PDF on the desktop
> [!NOTE]
> Printing and exporting as PDF are not perfect. Due to technical limitations, and sometimes even browser glitches the text might appear cut off in some circumstances. 
> Versions prior to v0.103.0 had two different options, one for printing and another one for exporting to PDF. With the introduction of the print preview, these functions have been unified.
On the desktop application of Trilium it is possible to export a note as PDF. To print a note:
* Press the menu button in the <a class="reference-link" href="../UI%20Elements/Note%20buttons.md">Note buttons</a> area and select _Print note_.
* Alternatively, printing can be triggered from a [keyboard shortcut](../Keyboard%20Shortcuts.md) (unassigned by default) or through the [command palette](../Navigation/Jump%20to%20%26%20command%20palette.md).
This will trigger the print preview screen next.
### Print preview & print options
The print preview dialog allows the following printing options to be adjusted:
* The printer to use
* _Save as PDF_ generates a PDF that is structured (maintains a table of contents, keeps the text selectable). Prefer this over other virtual PDF printers that ship with the operating system.
* Page orientation: _Portrait_ (default) or _Landscape_.
* Page size
* Scale the entire content from 10% to 200% to improve the fit within the page.
* Margins, which can be removed completely or adjusted individually for all the four edges.
* Print only a subset of pages. Individual page numbers are separated by colons and hyphen-based ranges are supported (e.g. 3-5 for pages 3 to 5).
Additional interaction:
* _Print using system dialog_ allows setting more options that are otherwise not available in Trilium.
> [!NOTE]
> Most of the options here (expect printer & which pages to print) are managed at note level through <a class="reference-link" href="../../Advanced%20Usage/Attributes.md">Attributes</a> (such as `#printLandscape`, `#printPageSize`, `#printScale`, `#printMargins`).
>
> This means that the print settings will be restored when printing the same note. There are no default settings that can be configured for all the notes, but this can be achieved via [inheritable attributes](../../Advanced%20Usage/Attributes/Attribute%20Inheritance.md).
## Printing on the browser
This feature allows printing of notes. It works on both the desktop client, but also on the web.
To print a note, select the <img src="Printing &amp; Exporting as PD.png" width="29" height="31"> button to the right of the note and select _Print note_. Depending on the size and type of the note, this can take up to a few seconds. Afterwards you will be redirected to the system/browser printing dialog.
On the server or PWA (mobile), the option is not available due to technical constraints and it will be hidden.
## Reporting issues with the rendering
Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to [report the issue](../../Troubleshooting/Reporting%20issues.md). In this case, it's best to offer a sample note (click on the <img src="1_Printing &amp; Exporting as PD.png" width="29" height="31"> button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information.
Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to [report the issue](../../Troubleshooting/Reporting%20issues.md). In this case, it's best to offer a sample note (click on the <img src="Printing &amp; Exporting as PD.png" width="29" height="31"> button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information.
Consider adjusting font sizes and using [page breaks](../../Note%20Types/Text/Insert%20buttons.md) to work around the layout.
## Exporting as PDF
On the desktop application of Trilium it is possible to export a note as PDF. On the server or PWA (mobile), the option is not available due to technical constraints and it will be hidden.
To print a note, select the ![](1_Printing%20&%20Exporting%20as%20PD.png) button to the right of the note and select _Export as PDF_. Afterwards you will be prompted to select where to save the PDF file.
> [!TIP]
> Although direct export as PDF is not available in the browser version of the application, it's still possible to generate a PDF by selecting the _Print_ option instead and selecting “Save to PDF” as the printer (depending on the browser). Generally, Mozilla Firefox has better printing capabilities.
@@ -39,16 +70,6 @@ To solve this, you can change the recommended application for PDFs via this comm
gio mime application/pdf
```
### Customizing exporting as PDF
When exporting to PDF, there are no customizable settings such as page orientation, size. However, there are a few <a class="reference-link" href="../../Advanced%20Usage/Attributes.md">Attributes</a> to adjust some of the settings:
* To print in landscape mode instead of portrait (useful for big diagrams or slides), add `#printLandscape`.
* By default, the resulting PDF will be in Letter format. It is possible to adjust it to another page size via the `#printPageSize` attribute, with one of the following values: `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`.
> [!NOTE]
> These options have no effect when used with the printing feature, since the user-defined settings are used instead.
## Printing multiple notes
Since v0.100.0, it is possible to print more than one note at the time by using <a class="reference-link" href="../../Collections.md">Collections</a>:
@@ -120,4 +141,6 @@ Both printing and exporting as PDF use the same mechanism: a note is rendered in
The webpage that renders a single note can actually be accessed in a web browser. For example `http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk` becomes `http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ`.
Accessing the print note in a web browser allows for easy debugging to understand why a particular note doesn't render well. The mechanism for rendering is similar to the one used in <a class="reference-link" href="Note%20List.md">Note List</a>.
Accessing the print note in a web browser allows for easy debugging to understand why a particular note doesn't render well. The mechanism for rendering is similar to the one used in <a class="reference-link" href="Note%20List.md">Note List</a>.
1. <sup><strong><a href="#fnrefsr779u3zm6">^</a></strong></sup>

View File

@@ -40,4 +40,4 @@ When pressed, the note will become editable but will become read-only again afte
Some note types have a special behavior based on whether the read-only mode is enabled:
* <a class="reference-link" href="../../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a> will hide the Mermaid source code and display the diagram preview in full-size. In this case, the read-only mode can be easily toggled on or off via a dedicated button in the <a class="reference-link" href="../UI%20Elements/Floating%20buttons.md">Floating buttons</a> area.
* <a class="reference-link" href="../../Collections/Geo%20Map.md">Geo Map View</a> will disallow all interaction that would otherwise change the map (dragging notes, adding new items).
* <a class="reference-link" href="../../Collections/Geo%20Map.md">Geo Map</a> will disallow all interaction that would otherwise change the map (dragging notes, adding new items).

View File

@@ -26,6 +26,37 @@ Note that the list of languages is not immediately refreshed, you'd have to manu
The list of languages is also shared with the [Code blocks](Text/Developer-specific%20formatting/Code%20blocks.md) feature of [Text](Text.md) notes.
## Word wrap
Long lines can be displayed on multiple lines:
* Globally for all code notes, from <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a> → _Code Notes._
* For a particular note, by going to the menu in <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20buttons.md">Note buttons</a> and selecting _Word wrap_ and selecting the appropriate option:
* _Auto_, to respect the global word wrap for code notes.
* _On_ or _Off_, to change the state of the word wrap for this note regardless of the global option.
## Adjusting options using the status bar
> [!NOTE]
> This feature is only available for the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/New%20Layout.md">New Layout</a>. For the old layout, the tab width can be adjusted at note level using the `#tabWidth` attribute, but re-indentation is not available.
The status bar at the bottom of the editor shows the current indentation settings and language. Clicking on the indentation indicator opens a menu with three sections:
1. **Indent Using** — switch between Spaces and Tabs. If a per-note override is active, a "Reset to default" option appears.
2. **Display Width** — choose from preset widths (1, 2, 3, 4, 6, 8). Changes are saved as a per-note `#tabWidth` label.
3. **Re-indent Content To** — convert existing indentation to a different style. For example, re-indent a file from 4 spaces to 2 spaces, or from spaces to tabs. This rewrites the leading whitespace on every line while preserving alignment remainders.
Clicking the language indicator lets you change the note's MIME type.
### Re-indentation
When you re-indent content, the editor:
* Measures the visual column width of each line's leading whitespace using the current style
* Calculates indent levels and any alignment remainder
* Rebuilds the leading whitespace in the target style
* Preserves non-leading whitespace, blank lines, and content without indentation
## Color schemes
Since Trilium 0.94.0 the colors of code notes can be customized by going <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a> → Code Notes and looking for the _Appearance_ section.

View File

@@ -36,6 +36,7 @@ In order to configure this new feature, a section has been added in Options →
* It is possible to disable the syntax highlighting for all the notes by selecting “No syntax highlighting” in the “Color scheme” option.
* Word wrapping is disabled by default, but can be configured from the same section.
* The tab width can also be adjusted from Options.
> [!NOTE]
> **Context regarding syntax highlighting**

View File

@@ -12,7 +12,7 @@
"@codemirror/lang-javascript": "6.2.5",
"@codemirror/lang-json": "6.0.2",
"@codemirror/lang-markdown": "6.5.0",
"@codemirror/language-data": "6.5.1",
"@codemirror/language-data": "6.5.2",
"@codemirror/lang-php": "6.0.2",
"@codemirror/lang-vue": "0.1.3",
"@codemirror/lang-xml": "6.1.0",

67
pnpm-lock.yaml generated
View File

@@ -819,8 +819,8 @@ importers:
specifier: 1.1.1
version: 1.1.1
officeparser:
specifier: 6.0.7
version: 6.0.7(encoding@0.1.13)
specifier: 6.1.0
version: 6.1.0(encoding@0.1.13)
rand-token:
specifier: 1.0.1
version: 1.0.1
@@ -1230,8 +1230,8 @@ importers:
specifier: 6.1.0
version: 6.1.0
'@codemirror/language-data':
specifier: 6.5.1
version: 6.5.1
specifier: 6.5.2
version: 6.5.2
'@codemirror/legacy-modes':
specifier: 6.5.2
version: 6.5.2
@@ -2035,6 +2035,9 @@ packages:
'@codemirror/lang-javascript@6.2.5':
resolution: {integrity: sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A==}
'@codemirror/lang-jinja@6.0.1':
resolution: {integrity: sha512-P5kyHLObzjtbGj16h+hyvZTxJhSjBEeSx4wMjbnAf3b0uwTy2+F0zGjMZL4PQOm/mh2eGZ5xUDVZXgwP783Nsw==}
'@codemirror/lang-json@6.0.2':
resolution: {integrity: sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==}
@@ -2077,8 +2080,8 @@ packages:
'@codemirror/lang-yaml@6.1.3':
resolution: {integrity: sha512-AZ8DJBuXGVHybpBQhmZtgew5//4hv3tdkXnr3vDmOUMJRuB6vn/uuwtmTOTlqEaQFg3hQSVeA90NmvIQyUV6FQ==}
'@codemirror/language-data@6.5.1':
resolution: {integrity: sha512-0sWxeUSNlBr6OmkqybUTImADFUP0M3P0IiSde4nc24bz/6jIYzqYSgkOSLS+CBIoW1vU8Q9KUWXscBXeoMVC9w==}
'@codemirror/language-data@6.5.2':
resolution: {integrity: sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==}
'@codemirror/language@6.12.3':
resolution: {integrity: sha512-QwCZW6Tt1siP37Jet9Tb02Zs81TQt6qQrZR2H+eGMcFsL1zMrk2/b9CLC7/9ieP1fjIUMgviLWMmgiHoJrj+ZA==}
@@ -6677,6 +6680,10 @@ packages:
resolution: {integrity: sha512-9k/gHF6n/pAi/9tqr3m3aqkuiNosYTurLLUtc7xQ9sxB/wm7WPygCv8GYa6mS0fLJEHhqMC1ATYhz++U/lRHqg==}
engines: {node: '>=10.0.0'}
'@xmldom/xmldom@0.9.9':
resolution: {integrity: sha512-qycIHAucxy/LXAYIjmLmtQ8q9GPnMbnjG1KXhWm9o5sCr6pOYDATkMPiTNa6/v8eELyqOQ2FsEqeoFYmgv/gJg==}
engines: {node: '>=14.6'}
'@xtuc/ieee754@1.2.0':
resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==}
@@ -8824,6 +8831,10 @@ packages:
resolution: {integrity: sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==}
engines: {node: '>=20'}
file-type@22.0.1:
resolution: {integrity: sha512-ww5Mhre0EE+jmBvOXTmXAbEMuZE7uX4a3+oRCQFNj8w++g3ev913N6tXQz0XTXbueQ5TWQfm6BdaViEHHn8bhA==}
engines: {node: '>=22'}
file-uri-to-path@1.0.0:
resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==}
@@ -11196,8 +11207,8 @@ packages:
ofetch@1.5.1:
resolution: {integrity: sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==}
officeparser@6.0.7:
resolution: {integrity: sha512-MkNHyWIfEZRDtB8c0fgJHdb4Ui0I/WztBjlUjlPiEbTO6dIYaJMt+llS5p5Foj13guUZgGxkkM9VwsVRthHNAA==}
officeparser@6.1.0:
resolution: {integrity: sha512-S/dMjUyhbeyDNUjnuGKsmuDx3IoOTcyy6uFzZ6321paaF5NVQVS+Ht8SkQEzEQ85DJ256LnTroMTP2PVKebX1Q==}
engines: {node: '>=18.0.0'}
hasBin: true
@@ -13424,6 +13435,10 @@ packages:
resolution: {integrity: sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==}
engines: {node: '>=18'}
uint8array-extras@1.5.0:
resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==}
engines: {node: '>=18'}
ulid@2.4.0:
resolution: {integrity: sha512-fIRiVTJNcSRmXKPZtGzFQv9WRrZ3M9eoptl/teFJvjOzmpU+/K/JH6HZ8deBfb5vMEpicJcLn7JmvdknlMq7Zg==}
hasBin: true
@@ -15572,6 +15587,17 @@ snapshots:
'@lezer/common': 1.5.2
'@lezer/javascript': 1.5.1
'@codemirror/lang-jinja@6.0.1':
dependencies:
'@codemirror/autocomplete': 6.18.6
'@codemirror/lang-html': 6.4.11
'@codemirror/language': 6.12.3
'@codemirror/state': 6.6.0
'@codemirror/view': 6.41.0
'@lezer/common': 1.5.2
'@lezer/highlight': 1.2.3
'@lezer/lr': 1.4.2
'@codemirror/lang-json@6.0.2':
dependencies:
'@codemirror/language': 6.12.3
@@ -15689,7 +15715,7 @@ snapshots:
'@lezer/lr': 1.4.2
'@lezer/yaml': 1.0.4
'@codemirror/language-data@6.5.1':
'@codemirror/language-data@6.5.2':
dependencies:
'@codemirror/lang-angular': 0.1.4
'@codemirror/lang-cpp': 6.0.3
@@ -15698,6 +15724,7 @@ snapshots:
'@codemirror/lang-html': 6.4.11
'@codemirror/lang-java': 6.0.2
'@codemirror/lang-javascript': 6.2.5
'@codemirror/lang-jinja': 6.0.1
'@codemirror/lang-json': 6.0.2
'@codemirror/lang-less': 6.0.2
'@codemirror/lang-liquid': 6.3.2
@@ -21588,6 +21615,8 @@ snapshots:
'@xmldom/xmldom@0.8.12': {}
'@xmldom/xmldom@0.9.9': {}
'@xtuc/ieee754@1.2.0': {}
'@xtuc/long@4.2.2': {}
@@ -24282,6 +24311,15 @@ snapshots:
transitivePeerDependencies:
- supports-color
file-type@22.0.1:
dependencies:
'@tokenizer/inflate': 0.4.1
strtok3: 10.3.5
token-types: 6.1.2
uint8array-extras: 1.5.0
transitivePeerDependencies:
- supports-color
file-uri-to-path@1.0.0: {}
file-uri-to-path@2.0.0: {}
@@ -27063,14 +27101,13 @@ snapshots:
node-fetch-native: 1.6.7
ufo: 1.6.1
officeparser@6.0.7(encoding@0.1.13):
officeparser@6.1.0(encoding@0.1.13):
dependencies:
'@xmldom/xmldom': 0.8.12
concat-stream: 2.0.0
file-type: 21.3.4
'@xmldom/xmldom': 0.9.9
fflate: 0.8.2
file-type: 22.0.1
pdfjs-dist: 5.6.205
tesseract.js: 7.0.0(encoding@0.1.13)
yauzl: 3.3.0
transitivePeerDependencies:
- encoding
- supports-color
@@ -29625,6 +29662,8 @@ snapshots:
uint8array-extras@1.4.0: {}
uint8array-extras@1.5.0: {}
ulid@2.4.0: {}
ulid@3.0.2: {}

View File

@@ -1,68 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>printToPDF Repro</title>
<style>
body { font-family: system-ui; padding: 20px; }
#log { white-space: pre-wrap; font-family: monospace; background: #f0f0f0; padding: 12px; margin-top: 16px; border-radius: 4px; max-height: 400px; overflow-y: auto; }
button { margin: 4px; padding: 8px 16px; cursor: pointer; }
.pass { color: green; } .fail { color: red; }
</style>
</head>
<body>
<h2>Electron printToPDF — Page Range State Corruption Repro</h2>
<p>Click <b>Run Test Sequence</b> to reproduce the bug. It will:</p>
<ol>
<li>Print with no page range (should succeed)</li>
<li>Print with page range "999" (should fail — page doesn't exist)</li>
<li>Print with no page range again (does it still work?)</li>
</ol>
<button id="run">Run Test Sequence</button>
<button id="run-fresh">Run Step 3 Only (fresh, no prior failure)</button>
<div id="log"></div>
<script>
const { ipcRenderer } = require("electron");
const logEl = document.getElementById("log");
function log(msg, cls) {
const line = document.createElement("div");
line.textContent = msg;
if (cls) line.className = cls;
logEl.appendChild(line);
logEl.scrollTop = logEl.scrollHeight;
}
async function runStep(step, pageRanges, description) {
log(`\n--- Step ${step}: ${description} (pageRanges=${JSON.stringify(pageRanges)}) ---`);
const result = await ipcRenderer.invoke("print-test", { pageRanges, step });
if (result.ok) {
log(` ✓ SUCCESS (buffer: ${result.size} bytes)`, "pass");
} else {
log(` ✗ FAILED: ${result.error}`, "fail");
}
return result;
}
document.getElementById("run").addEventListener("click", async () => {
logEl.textContent = "";
log("=== Test Sequence: state corruption after failed pageRanges ===");
await runStep(1, "", "No page range (baseline)");
await runStep(2, "999", "Invalid page range (expect failure)");
await runStep(3, "", "No page range again (does state persist?)");
log("\n=== Done ===");
log("If Step 3 fails with 'Page range exceeds page count',");
log("it confirms an Electron/Chromium state corruption bug.");
});
document.getElementById("run-fresh").addEventListener("click", async () => {
logEl.textContent = "";
log("=== Control: single call with no page range ===");
await runStep("C", "", "No page range (no prior failure)");
log("\n=== Done ===");
});
</script>
</body>
</html>

View File

@@ -1,53 +0,0 @@
const { app, BrowserWindow, ipcMain } = require("electron");
let mainWindow;
app.whenReady().then(() => {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
});
mainWindow.loadFile("index.html");
});
ipcMain.handle("print-test", async (_e, { pageRanges, step }) => {
const printWindow = new BrowserWindow({
show: false,
width: 1,
height: 1,
webPreferences: { offscreen: process.platform !== "linux" },
});
await printWindow.loadFile("print-page.html");
// Wait for content to be ready.
await printWindow.webContents.executeJavaScript(
`new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)))`
);
const opts = {
landscape: false,
pageSize: "A4",
scale: 1,
printBackground: true,
// Only include pageRanges if truthy (non-empty string).
...(pageRanges ? { pageRanges } : {}),
};
console.log(`[Step ${step}] printToPDF called with:`, JSON.stringify(opts));
try {
const buffer = await printWindow.webContents.printToPDF(opts);
console.log(`[Step ${step}] SUCCESS - buffer size: ${buffer.length}`);
printWindow.destroy();
return { ok: true, size: buffer.length };
} catch (err) {
console.error(`[Step ${step}] FAILED: ${err.message}`);
printWindow.destroy();
return { ok: false, error: err.message };
}
});

View File

@@ -1,13 +0,0 @@
{
"name": "electron-printpdf-page-range-repro",
"version": "1.0.0",
"private": true,
"description": "Minimal repro for Electron printToPDF state corruption after an invalid pageRanges failure",
"main": "main.js",
"scripts": {
"start": "electron ."
},
"devDependencies": {
"electron": "^35.0.0"
}
}

View File

@@ -1,8 +0,0 @@
<!DOCTYPE html>
<html>
<head><title>Print Test</title></head>
<body>
<h1>Test Page</h1>
<p>This is a single-page document used to reproduce the printToPDF bug.</p>
</body>
</html>