An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Refine tab task controls and title editing https://github.com/siyuan-note/siyuan/issues/17642
Daniel84525e79d87c
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-6yi0dv5/20200924101225-k254i8g.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-6yi0dv5/20200924101225-k254i8g.syindex 310974268a..d9fdd62623 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-6yi0dv5/20200924101225-k254i8g.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-6yi0dv5/20200924101225-k254i8g.sy@@ -6,7 +6,7 @@"id": "20200924101225-k254i8g","title": "Content Block Type","type": "doc",- "updated": "20260906185527"+ "updated": "20260906202104"},"Children": [{@@ -1336,7 +1336,7 @@"HeadingLevel": 2,"Properties": {"id": "20210104091538-a55chyw",- "updated": "20260906185527"+ "updated": "20260906202104"},"Children": [{@@ -2696,7 +2696,7 @@"Type": "NodeHeading","Properties": {"id": "20260905124213-wbxn79t",- "updated": "20260906185527"+ "updated": "20260906202104"},"HeadingLevel": 3,"Children": [@@ -2711,12 +2711,12 @@"Type": "NodeParagraph","Properties": {"id": "20260905124213-dak8rh5",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{"Type": "NodeText",- "Data": "A tabbed container groups related content and displays one tab item at a time. Click a title to switch tabs and drag titles to reorder them. The selected tab and the top or left layout are saved and synced, and restored after a refresh or restart."+ "Data": "Tabs group related content. Click a title to switch tabs, drag to reorder, or double-click to rename. Tabs can appear at the top or on the left; the selected tab is saved and synced."}]},@@ -2781,117 +2781,12 @@}]},- {- "ID": "20260906003122-knct56j",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-knct56j",- "updated": "20260906185527"- },- "Children": [- {- "Type": "NodeText",- "Data": "Type / and choose the tabs block to create a group. Use + to add tabs and open the tabs block icon menu to choose top or left tabs from the Tabs submenu. Double-click a title or use Rename to edit the text directly in the tab. Like callout titles, tab titles support WYSIWYG editing: use the inline toolbar to apply bold, colors, and other styles while preserving existing formatting as you edit the text. Right-click a tab title and choose "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "Copy"- },- {- "Type": "NodeText",- "Data": " - "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "Copy block ref"- },- {- "Type": "NodeText",- "Data": " to copy a block reference to that tab. Clicking the reference switches to the target tab and reveals each enclosing tab when nested. On mobile, you can also create a tabs block from the editor insert menu. When a task list is converted to tabs, each title shows its task status. Click the status icon to toggle completion, or right-click it to enter a custom status character; an empty value means incomplete. Converting back to a task list preserves the current status, including custom markers. Status changes do not switch tabs or alter title text and formatting."- }- ]- },- {- "ID": "20260906003122-bmkcb6i",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-bmkcb6i",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeText",- "Data": "Use the list or tabs "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "block icon menu"- },- {- "Type": "NodeText",- "Data": " - "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "Turn into"- },- {- "Type": "NodeText",- "Data": " to convert between lists and tabs. Each list item’s first paragraph becomes its full title without being duplicated in the body. Converting back restores it as the first paragraph, preserving formatting, its block ID and attributes."- }- ]- },- {- "ID": "20260906003122-onyjz2c",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-onyjz2c",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeText",- "Data": "Markdown example: a space is required between ::: and tabs. @tab starts an item, @tab:active selects it, and the closing fence occupies its own line. For nesting, outer fences must be longer than inner fences; indentation is optional. For example, use four colons outside and three inside."- }- ]- },- {- "ID": "20260906003122-0rbj8az",- "Type": "NodeCodeBlock",- "Properties": {- "id": "20260906003122-0rbj8az",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeCodeBlockFenceOpenMarker",- "Data": "```"- },- {- "Type": "NodeCodeBlockFenceInfoMarker",- "CodeBlockInfo": "bWFya2Rvd24="- },- {- "Type": "NodeCodeBlockCode",- "Data": "::: tabs\n@tab First tab\n\nThis is the first tab’s body.\n\n@tab:active Second tab\n\nClick the second tab to view this content.\n:::\n"- },- {- "Type": "NodeCodeBlockFenceCloseMarker",- "Data": "```"- }- ],- "IsFencedCodeBlock": true- },{"ID": "20260906003122-tfblsll","Type": "NodeHeading","Properties": {"id": "20260906003122-tfblsll",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{@@ -2906,12 +2801,12 @@"Type": "NodeParagraph","Properties": {"id": "20260906003122-gtkz3ie",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{"Type": "NodeText",- "Data": "A tab item block belongs to a tabbed container, has its own block ID, and contains a title and body. Its body can contain paragraphs, lists and nested tabbed containers. A tabbed container can directly contain only tab items; a tab item cannot stand alone in a document."+ "Data": "Each tab item has a title and body and supports nested content and block references. Right-click a tab title and use the checkbox option to toggle task mode for the group."}]},diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200905090211-2vixtlf.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200905090211-2vixtlf.syindex 1d595dc727..659b9533c5 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200905090211-2vixtlf.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200905090211-2vixtlf.sy@@ -6,7 +6,7 @@"id": "20200905090211-2vixtlf","title": "内容块类型","type": "doc",- "updated": "20260906185527"+ "updated": "20260906202104"},"Children": [{@@ -1369,7 +1369,7 @@"HeadingLevel": 2,"Properties": {"id": "20210104090624-9qgquxh",- "updated": "20260906185527"+ "updated": "20260906202104"},"Children": [{@@ -2778,7 +2778,7 @@"Type": "NodeHeading","Properties": {"id": "20260905124213-9etkynq",- "updated": "20260906185527"+ "updated": "20260906202104"},"HeadingLevel": 3,"Children": [@@ -2793,12 +2793,12 @@"Type": "NodeParagraph","Properties": {"id": "20260905124213-6mc5n1n",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{"Type": "NodeText",- "Data": "页签块将相关内容收纳在同一组页签中,一次显示一个页签项的正文。点击标题切换,拖拽标题排序;选中的页签和顶部或左侧布局会保存并同步,刷新或重启后可恢复。"+ "Data": "页签块将内容分组显示,点击标题切换,拖拽标题排序,双击标题重命名。支持顶部或左侧布局,选中状态会保存并同步。"}]},@@ -2863,117 +2863,12 @@}]},- {- "ID": "20260906003122-812ct16",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-812ct16",- "updated": "20260906185527"- },- "Children": [- {- "Type": "NodeText",- "Data": "输入 / 并选择页签块可创建一组页签。通过 + 添加页签,点击页签块的块标,在页签块子菜单中选择顶部页签或左侧页签。双击标题或使用重命名菜单,可以在页签标题处直接编辑文字。标题与提示块一样支持所见即所得编辑,可通过行级工具栏设置加粗、颜色等样式,修改文字时保留已有格式。右键点击页签标题,选择 "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "复制"- },- {- "Type": "NodeText",- "Data": " - "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "复制为块引用"- },- {- "Type": "NodeText",- "Data": " 可复制该页签的块引用。点击引用会切换到对应页签;嵌套页签会逐层展开。移动端也可通过编辑器插入菜单新建页签块。任务列表转换为页签块后,标题前会显示任务状态。点击状态图标可切换完成状态,右键点击可输入一个自定义状态字符,留空表示未完成。转换回任务列表时保留当前状态,包括自定义状态。状态操作不切换页签,也不改变标题文字和样式。"- }- ]- },- {- "ID": "20260906003122-j2v89xm",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-j2v89xm",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeText",- "Data": "通过列表或页签块的 "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "块标菜单"- },- {- "Type": "NodeText",- "Data": " - "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "转换为"- },- {- "Type": "NodeText",- "Data": ",可以在列表和页签之间转换。列表项首段落作为完整标题,不重复出现在正文中;转回列表时还原为首段落,保留其格式、块 ID 和属性。"- }- ]- },- {- "ID": "20260906003122-t6toer8",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-t6toer8",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeText",- "Data": "Markdown 示例:::: 与 tabs 之间需要空格,@tab 开始一个页签项,@tab:active 指定选中项,结束围栏独占一行。嵌套时外层围栏比内层长,缩进可选,例如外层使用四个冒号、内层使用三个。"- }- ]- },- {- "ID": "20260906003122-jdsnmej",- "Type": "NodeCodeBlock",- "Properties": {- "id": "20260906003122-jdsnmej",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeCodeBlockFenceOpenMarker",- "Data": "```"- },- {- "Type": "NodeCodeBlockFenceInfoMarker",- "CodeBlockInfo": "bWFya2Rvd24="- },- {- "Type": "NodeCodeBlockCode",- "Data": "::: tabs\n@tab 第一页\n\n这是第一页的正文。\n\n@tab:active 第二页\n\n点击第二个页签查看此内容。\n:::\n"- },- {- "Type": "NodeCodeBlockFenceCloseMarker",- "Data": "```"- }- ],- "IsFencedCodeBlock": true- },{"ID": "20260906003122-tqc63mt","Type": "NodeHeading","Properties": {"id": "20260906003122-tqc63mt",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{@@ -2988,12 +2883,12 @@"Type": "NodeParagraph","Properties": {"id": "20260906003122-xun3tcl",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{"Type": "NodeText",- "Data": "页签项块属于页签块,包含标题和正文,有独立的块 ID。正文可以包含段落、列表等内容,也可以嵌套页签块。页签块只能直接包含页签项块,页签项不能独立放在文档中。"+ "Data": "页签项包含标题和正文,支持嵌套内容和块引用。右键点击页签标题,可通过复选框选项切换整组的任务模式。"}]},diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120147-ib6yy3i.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120147-ib6yy3i.syindex 326fa2bd4f..c557e34db2 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120147-ib6yy3i.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120147-ib6yy3i.sy@@ -6,7 +6,7 @@"id": "20211226120147-ib6yy3i","title": "內容區塊類型","type": "doc",- "updated": "20260906185527"+ "updated": "20260906202104"},"Children": [{@@ -1365,7 +1365,7 @@"HeadingLevel": 2,"Properties": {"id": "20211226120227-esm6f20",- "updated": "20260906185527"+ "updated": "20260906202104"},"Children": [{@@ -2696,7 +2696,7 @@"Type": "NodeHeading","Properties": {"id": "20260905124213-371qsy7",- "updated": "20260906185527"+ "updated": "20260906202104"},"HeadingLevel": 3,"Children": [@@ -2711,12 +2711,12 @@"Type": "NodeParagraph","Properties": {"id": "20260905124213-n1gggna",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{"Type": "NodeText",- "Data": "頁籤區塊將相關內容收納在同一組頁籤中,一次顯示一個頁籤項目的正文。點擊標題切換,拖曳標題排序;選取的頁籤和頂部或左側配置會儲存並同步,重新整理或重新啟動後可恢復。"+ "Data": "頁籤區塊將內容分組顯示,點擊標題切換,拖曳標題排序,按兩下標題重新命名。支援頂部或左側配置,選取狀態會儲存並同步。"}]},@@ -2781,117 +2781,12 @@}]},- {- "ID": "20260906003122-0jlwsyi",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-0jlwsyi",- "updated": "20260906185527"- },- "Children": [- {- "Type": "NodeText",- "Data": "輸入 / 並選擇頁籤區塊可建立一組頁籤。透過 + 新增頁籤,點擊頁籤區塊的區塊圖示,在頁籤區塊子選單中選擇頂部頁籤或左側頁籤。按兩下標題或使用重新命名選單,即可在頁籤標題處直接編輯文字。標題與提示區塊一樣支援所見即所得編輯,可透過行級工具列設定粗體、顏色等樣式,修改文字時保留既有格式。在頁籤標題上按右鍵,選擇 "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "複製"- },- {- "Type": "NodeText",- "Data": " - "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "複製為區塊引用"- },- {- "Type": "NodeText",- "Data": " 可複製該頁籤的區塊引用。點擊引用會切換至對應頁籤;巢狀頁籤會逐層展開。行動端也可透過編輯器插入選單建立頁籤區塊。任務清單轉換為頁籤區塊後,標題前會顯示任務狀態。點擊狀態圖示可切換完成狀態,按右鍵可輸入一個自訂狀態字元,留空表示未完成。轉回任務清單時保留目前狀態,包括自訂狀態。狀態操作不切換頁籤,也不改變標題文字與樣式。"- }- ]- },- {- "ID": "20260906003122-n21xwrx",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-n21xwrx",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeText",- "Data": "透過列表或頁籤區塊的 "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "區塊圖示選單"- },- {- "Type": "NodeText",- "Data": " - "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "轉換為"- },- {- "Type": "NodeText",- "Data": ",可以在列表和頁籤之間轉換。列表項目首段落作為完整標題,不重複出現在正文中;轉回列表時還原為首段落,保留其格式、區塊 ID 和屬性。"- }- ]- },- {- "ID": "20260906003122-lcxok4v",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-lcxok4v",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeText",- "Data": "Markdown 範例:::: 與 tabs 之間需要空格,@tab 開始一個頁籤項目,@tab:active 指定選取項目,結束圍欄獨占一行。巢狀使用時外層圍欄比內層長,縮排可選,例如外層使用四個冒號、內層使用三個。"- }- ]- },- {- "ID": "20260906003122-6aj8ks9",- "Type": "NodeCodeBlock",- "Properties": {- "id": "20260906003122-6aj8ks9",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeCodeBlockFenceOpenMarker",- "Data": "```"- },- {- "Type": "NodeCodeBlockFenceInfoMarker",- "CodeBlockInfo": "bWFya2Rvd24="- },- {- "Type": "NodeCodeBlockCode",- "Data": "::: tabs\n@tab 第一頁\n\n這是第一頁的正文。\n\n@tab:active 第二頁\n\n點擊第二個頁籤查看此內容。\n:::\n"- },- {- "Type": "NodeCodeBlockFenceCloseMarker",- "Data": "```"- }- ],- "IsFencedCodeBlock": true- },{"ID": "20260906003122-6qha4x8","Type": "NodeHeading","Properties": {"id": "20260906003122-6qha4x8",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{@@ -2906,12 +2801,12 @@"Type": "NodeParagraph","Properties": {"id": "20260906003122-6we2ve6",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{"Type": "NodeText",- "Data": "頁籤項目區塊屬於頁籤區塊,包含標題和正文,有獨立的區塊 ID。正文可以包含段落、列表等內容,也可以巢狀放置頁籤區塊。頁籤區塊只能直接包含頁籤項目區塊,頁籤項目不能獨立放在文件中。"+ "Data": "頁籤項包含標題與正文,支援巢狀內容和區塊引用。在頁籤標題上按右鍵,可透過覈取方塊選項切換整組的任務模式。"}]},diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-gvtksyj/20240530101000-35bbvcx.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-gvtksyj/20240530101000-35bbvcx.syindex 13e77ab160..b450fb51e3 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-gvtksyj/20240530101000-35bbvcx.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-gvtksyj/20240530101000-35bbvcx.sy@@ -7,7 +7,7 @@"id": "20240530101000-35bbvcx","title": "コンテンツブロックの種類","type": "doc",- "updated": "20260906185527"+ "updated": "20260906202104"},"Children": [{@@ -1422,7 +1422,7 @@"Properties": {"ID": "20240530101000-rjjxxn8","id": "20240530101000-p035stn",- "updated": "20260906185527"+ "updated": "20260906202104"},"Children": [{@@ -2890,7 +2890,7 @@"Type": "NodeHeading","Properties": {"id": "20260905124213-rmj1ui2",- "updated": "20260906185527"+ "updated": "20260906202104"},"HeadingLevel": 3,"Children": [@@ -2905,12 +2905,12 @@"Type": "NodeParagraph","Properties": {"id": "20260905124213-q5thtxj",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{"Type": "NodeText",- "Data": "タブブロックは関連する内容をまとめ、選択したタブ項目の本文だけを表示します。タイトルのクリックで切り替え、ドラッグで並べ替えます。選択したタブと上部または左側の配置は保存・同期され、再読み込みや再起動後も復元されます。"+ "Data": "タブブロックは内容をグループに分けて表示します。タイトルのクリックで切り替え、ドラッグで並べ替え、ダブルクリックで名前を変更できます。上部または左側に配置でき、選択したタブは保存・同期されます。"}]},@@ -2975,117 +2975,12 @@}]},- {- "ID": "20260906003122-om7wyo8",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-om7wyo8",- "updated": "20260906185527"- },- "Children": [- {- "Type": "NodeText",- "Data": "/ を入力してタブブロックを選択すると、タブのグループを作成できます。+ でタブを追加し、タブブロックのアイコンメニューを開き、タブブロックのサブメニューから上部タブまたは左側タブを選択します。タイトルをダブルクリックするか名前変更メニューを使うと、タブのタイトルをその場で直接編集できます。コールアウトのタイトルと同様に、見たままの状態で編集でき、インラインツールバーから太字や文字色などを設定できます。文字を変更しても既存の書式は保持されます。タイトルを右クリックし、"- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "コピー"- },- {- "Type": "NodeText",- "Data": " - "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "ブロック参照としてコピー"- },- {- "Type": "NodeText",- "Data": " を選択すると、そのタブへのブロック参照をコピーできます。参照をクリックすると対象のタブに切り替わり、入れ子の場合は外側のタブから順に表示されます。モバイルでもエディターの挿入メニューからタブブロックを作成できます。タスクリストをタブブロックに変換すると、タイトルの前にタスクの状態が表示されます。状態アイコンをクリックすると完了状態が切り替わり、右クリックするとカスタム状態を表す1文字を入力できます。空欄は未完了を意味します。タスクリストに戻すと、カスタム状態も含めて現在の状態が保持されます。状態の操作でタブが切り替わったり、タイトルの文字や書式が変わったりすることはありません。"- }- ]- },- {- "ID": "20260906003122-z3z90i9",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-z3z90i9",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeText",- "Data": "リストまたはタブの "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "ブロックアイコンメニュー"- },- {- "Type": "NodeText",- "Data": " - "- },- {- "Type": "NodeTextMark",- "TextMarkType": "kbd",- "TextMarkTextContent": "変換"- },- {- "Type": "NodeText",- "Data": " から、リストとタブを相互に変換できます。リスト項目の最初の段落が省略なしでタイトルになり、本文には重複しません。リストに戻すと最初の段落として復元され、書式、ブロック ID、属性が保持されます。"- }- ]- },- {- "ID": "20260906003122-x1ssv4a",- "Type": "NodeParagraph",- "Properties": {- "id": "20260906003122-x1ssv4a",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeText",- "Data": "Markdown の例:::: と tabs の間には空白が必要です。@tab で項目を開始し、@tab:active で選択項目を指定します。閉じるフェンスは独立した行に置きます。入れ子では外側のフェンスを内側より長くし、字下げは任意です。例えば外側をコロン四つ、内側を三つにします。"- }- ]- },- {- "ID": "20260906003122-o05eqs7",- "Type": "NodeCodeBlock",- "Properties": {- "id": "20260906003122-o05eqs7",- "updated": "20260906003122"- },- "Children": [- {- "Type": "NodeCodeBlockFenceOpenMarker",- "Data": "```"- },- {- "Type": "NodeCodeBlockFenceInfoMarker",- "CodeBlockInfo": "bWFya2Rvd24="- },- {- "Type": "NodeCodeBlockCode",- "Data": "::: tabs\n@tab 最初のタブ\n\n最初のタブの本文です。\n\n@tab:active 二つ目のタブ\n\n二つ目のタブをクリックすると、この内容が表示されます。\n:::\n"- },- {- "Type": "NodeCodeBlockFenceCloseMarker",- "Data": "```"- }- ],- "IsFencedCodeBlock": true- },{"ID": "20260906003122-3mia0g1","Type": "NodeHeading","Properties": {"id": "20260906003122-3mia0g1",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{@@ -3100,12 +2995,12 @@"Type": "NodeParagraph","Properties": {"id": "20260906003122-azyooos",- "updated": "20260906003122"+ "updated": "20260906202104"},"Children": [{"Type": "NodeText",- "Data": "タブ項目ブロックはタブブロックに属し、独立したブロック ID、タイトル、本文を持ちます。本文には段落やリスト、入れ子のタブブロックを含められます。タブブロックの直接の子はタブ項目だけで、タブ項目をドキュメント内に単独で置くことはできません。"+ "Data": "タブ項目にはタイトルと本文があり、入れ子の内容とブロック参照に対応しています。タイトルを右クリックし、チェックボックスの項目でグループ全体のタスクモードを切り替えられます。"}]},diff --git a/app/src/protyle/render/tabsRender.ts b/app/src/protyle/render/tabsRender.tsindex eba70be99a..20697a689d 100644--- a/app/src/protyle/render/tabsRender.ts+++ b/app/src/protyle/render/tabsRender.ts@@ -15,6 +15,7 @@ export interface ITabsRenderOptions {task?: (item: HTMLElement) => void;taskMenu?: (item: HTMLElement) => void;taskLabel?: string;+ endEdit?: () => void;}interface ITabState {@@ -191,7 +192,12 @@ export const tabsRender = (element: Element, options: ITabsRenderOptions = {}) =}const signature = JSON.stringify([readonly, ...items.map(item => [itemID(item),item.getAttribute("tabs-task"), item.dataset.tabsEditing === "true" ? null : getTabTitle(item)?.innerHTML])]);+ let previousScroll: {left: number, top: number};if (state.signature !== signature || !header.firstElementChild) {+ const previousList = header.querySelector<HTMLElement>(".tabs-list");+ if (previousList) {+ previousScroll = {left: previousList.scrollLeft, top: previousList.scrollTop};+ }const focusedID = (document.activeElement as HTMLElement)?.dataset?.tabId;const focusedTask = document.activeElement?.classList.contains("tabs-task");header.replaceChildren();@@ -238,8 +244,7 @@ export const tabsRender = (element: Element, options: ITabsRenderOptions = {}) =const marker = item.getAttribute("tabs-task");if (marker !== null) {const task = document.createElement("span");- task.className = "tabs-task ariaLabel";- task.setAttribute("data-position", "north");+ task.className = "tabs-task";task.dataset.tabId = itemID(item);task.setAttribute("role", "checkbox");task.setAttribute("aria-label", controller.options.taskLabel || "Task");@@ -329,7 +334,7 @@ export const tabsRender = (element: Element, options: ITabsRenderOptions = {}) =if (focusedID) {const focusedButton = Array.from(list.children).find(child =>(child as HTMLElement).dataset.tabId === focusedID) as HTMLElement;- (focusedTask ? focusedButton?.querySelector<HTMLElement>(".tabs-task") : focusedButton)?.focus();+ (focusedTask ? focusedButton?.querySelector<HTMLElement>(".tabs-task") : focusedButton)?.focus({preventScroll: true});}}const list = header.querySelector<HTMLElement>(".tabs-list");@@ -370,6 +375,9 @@ export const tabsRender = (element: Element, options: ITabsRenderOptions = {}) =button.draggable = !readonly && !editing && !!controller.options.move;const info = item.querySelector<HTMLElement>(":scope > .tab-item-info");if (info) {+ if (!editing && info.classList.contains("tabs-title-editor")) {+ controller.options.endEdit?.();+ }info.classList.toggle("tabs-title-editor", editing);if (!editing) {info.removeAttribute("style");@@ -377,6 +385,10 @@ export const tabsRender = (element: Element, options: ITabsRenderOptions = {}) =}});tabs.setAttribute("data-tabs-ready", "true");+ if (previousScroll) {+ list.scrollLeft = previousScroll.left;+ list.scrollTop = previousScroll.top;+ }if (editingButton && !vertical) {// 展开编辑标签后滚动到完整可见的位置,避免右侧页签的输入区域被裁切。const listRect = list.getBoundingClientRect();diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.tsindex 02e13e7200..f5413e1144 100644--- a/app/src/protyle/toolbar/index.ts+++ b/app/src/protyle/toolbar/index.ts@@ -296,6 +296,7 @@ export class Toolbar {}});if (!hasText ||+ !Array.from(range.getClientRects()).some(rect => rect.width > 0 && rect.height > 0) ||// 拖拽图片到最右侧(range.commonAncestorContainer.nodeType !== 3 && (range.commonAncestorContainer as HTMLElement).classList.contains("img"))) {this.element.classList.add("fn__none");diff --git a/app/src/protyle/wysiwyg/tabs.ts b/app/src/protyle/wysiwyg/tabs.tsindex 08062d502f..75d0f68f3a 100644--- a/app/src/protyle/wysiwyg/tabs.ts+++ b/app/src/protyle/wysiwyg/tabs.ts@@ -15,6 +15,19 @@ import {copyTextByType} from "../toolbar/util";import {Dialog} from "../../dialog";import {showMessage} from "../../dialog/message";import {getTaskListMarker, nextTaskListMarker} from "./taskListMarker";+import {hideElements} from "../ui/hideElements";++export const toggleTabsTasks = (protyle: IProtyle, tabs: HTMLElement) => {+ const items = getTabItems(tabs);+ const enabled = items.some(item => item.hasAttribute("tabs-task"));+ changeTabs(protyle, [tabs], () => items.forEach(item => {+ if (enabled) {+ item.removeAttribute("tabs-task");+ } else {+ item.setAttribute("tabs-task", " ");+ }+ }));+};export const setTabTask = (protyle: IProtyle, item: HTMLElement, marker: string) => {if (!item.isConnected || !item.hasAttribute("tabs-task") || !getTaskListMarker(`[${marker}]`, false)) {@@ -94,9 +107,7 @@ export const renameTab = (protyle: IProtyle, item: HTMLElement) => {const addTab = (protyle: IProtyle, tabs: HTMLElement) => {const item = newTab(protyle);const items = getTabItems(tabs);- const active = items.find(entry => entry.dataset.tabsHidden === "false") ||- items.find(entry => entry.dataset.nodeId === tabs.getAttribute("tabs-active-id")) || items[0];- if (active?.hasAttribute("tabs-task")) {+ if (items.some(entry => entry.hasAttribute("tabs-task"))) {item.setAttribute("tabs-task", " ");}changeTabs(protyle, [tabs], () => {@@ -174,6 +185,9 @@ export const openTabsMenu = (protyle: IProtyle, tabs: HTMLElement, item: HTMLEleclick: () => {copyTextByType([item.dataset.nodeId], "ref");},}]});if (canEdit(protyle, tabs)) {+ menu.addItem({icon: "iconCheck", label: lang.checkbox,+ checked: getTabItems(tabs).some(entry => entry.hasAttribute("tabs-task")),+ click: () => toggleTabsTasks(protyle, tabs)});if (item.hasAttribute("tabs-task")) {menu.addItem({icon: "iconCheck", label: `${lang.check} - ${lang.custom}`, click: () => editTabTask(protyle, item)});}@@ -216,6 +230,7 @@ export const initEditorTabs = (protyle: IProtyle) => {taskLabel: window.siyuan.languages.check,task: item => setTabTask(protyle, item, nextTaskListMarker(item.getAttribute("tabs-task"))),taskMenu: item => editTabTask(protyle, item),+ endEdit: () => hideElements(["toolbar"], protyle),select: (tabs, id) => {if (!canEdit(protyle, tabs) || tabs.getAttribute("tabs-active-id") === id) {return;