diff --git a/UserGuide.md b/UserGuide.md index ab29363..ffb3077 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -1,6 +1,6 @@ -# Knowledge for Zotero User Guide: Workflow +# Zotero Better Notes User Guide: Workflow -Welcome to **Knowledge for Zotero** ! +Welcome to **Zotero Better Notes** ! This note helps you quickly learn how to use this addon in 3 min! @@ -124,4 +124,4 @@ Switch between different main notes with the '📂folder' button on the bottom o Congratulations! -You can select a new main note and start working with **Knowledge for Zotero** now. Have fun! +You can select a new main note and start working with **Zotero Better Notes** now. Have fun! diff --git a/UserGuideCN.md b/UserGuideCN.md index 716aae0..248ee7b 100644 --- a/UserGuideCN.md +++ b/UserGuideCN.md @@ -1,6 +1,6 @@ -# Knowledge for Zotero 用户指引:工作流 +# Zotero Better Notes 用户指引:工作流 -欢迎使用 **Knowledge for Zotero** ! +欢迎使用 **Zotero Better Notes** ! 本笔记帮助您在 3 分钟内快速学习如何使用此插件! @@ -124,4 +124,4 @@ Zotero 的 note 很像一个标记/富文本编辑器。您可以使用上方工 恭喜! -你现在可以选择或新建一个主笔记,然后开始使用 **Knowledge for Zotero**了。用的开心! +你现在可以选择或新建一个主笔记,然后开始使用 **Zotero Better Notes**了。用的开心! diff --git a/addon/chrome/content/treeView.html b/addon/chrome/content/treeView.html index 3575bb5..5ae2951 100644 --- a/addon/chrome/content/treeView.html +++ b/addon/chrome/content/treeView.html @@ -83,12 +83,7 @@ height: $("window").height() - 100, displayExpr: "name", noDataText: "Create a heading with '+'", - onItemClick: (e) => { - window.parent.postMessage( - { type: "jumpNode", lineIndex: e.itemData.lineIndex }, - "*" - ); - }, + onItemClick: jumpNode, }); } @@ -291,21 +286,23 @@ }); } - function jumpNode(e, obj) { - var adorn = obj.part; - var oldnode = adorn.adornedPart; - var olddata = oldnode.data; - if (olddata.noteLink) { + function jumpNode(e) { + var itemData = e.itemData; + if (itemData.noteLink) { window.parent.postMessage( - { type: "jumpNote", link: olddata.noteLink }, + { + type: "jumpNote", + link: itemData.noteLink, + id: parseInt(itemData.id), + }, "*" ); } else { window.parent.postMessage( { type: "jumpNode", - lineIndex: olddata.lineIndex, - id: parseInt(olddata.id), + lineIndex: itemData.lineIndex, + id: parseInt(itemData.id), }, "*" ); diff --git a/addon/chrome/content/wizard.xul b/addon/chrome/content/wizard.xul index d68f7bc..c5d4e4c 100644 --- a/addon/chrome/content/wizard.xul +++ b/addon/chrome/content/wizard.xul @@ -49,7 +49,7 @@ diff --git a/addon/chrome/content/workspace.xul b/addon/chrome/content/workspace.xul index 2b7f531..cd7b034 100644 --- a/addon/chrome/content/workspace.xul +++ b/addon/chrome/content/workspace.xul @@ -2,11 +2,19 @@ + + + %globalDTD; + + %standaloneDTD; + + %editMenuOverlayDTD; %zoteroDTD; @@ -17,17 +25,66 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -35,14 +92,6 @@ -
- - - - - - Select Main Note -
@@ -51,39 +100,6 @@ Switch Outline Mode
-
- - - - - - - Add Heading -
-
- - - - - - Decrease the selected Heading level -
-
- - - - - - Raise the selected Heading level -
-
- - - - - - Open User Guide -
diff --git a/addon/chrome/locale/en-US/overlay.dtd b/addon/chrome/locale/en-US/overlay.dtd index 012e2f6..f66cf7f 100644 --- a/addon/chrome/locale/en-US/overlay.dtd +++ b/addon/chrome/locale/en-US/overlay.dtd @@ -1,14 +1,26 @@ + + + + + + + + + + + + - + - - + + @@ -29,7 +41,7 @@ - + diff --git a/addon/chrome/locale/zh-CN/overlay.dtd b/addon/chrome/locale/zh-CN/overlay.dtd index bf9a2b9..d79459f 100644 --- a/addon/chrome/locale/zh-CN/overlay.dtd +++ b/addon/chrome/locale/zh-CN/overlay.dtd @@ -1,4 +1,16 @@ + + + + + + + + + + + + @@ -7,13 +19,13 @@ - - + + - + @@ -29,7 +41,7 @@ - + diff --git a/addon/install.rdf b/addon/install.rdf index 7c2a826..42cdfe9 100644 --- a/addon/install.rdf +++ b/addon/install.rdf @@ -13,7 +13,7 @@ em:description="__description__" em:homepageURL="__homepage__" em:iconURL="chrome://__addonRef__/skin/favicon.png" - em:updateURL="https://raw.githubusercontent.com/windingwind/Knowledge4Zotero/master/update.rdf">> + em:updateURL="https://raw.githubusercontent.com/windingwind/zotero-better-notes/master/update.rdf">> 2 diff --git a/package.json b/package.json index 4d248df..adcdcc3 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "knowledge-for-zotero", - "addonName": "Knowledge for Zotero", + "name": "zotero-better-notes", + "addonName": "Zotero Better Notes", "addonID": "Knowledge4Zotero@windingwind.com", "addonRef": "Knowledge4Zotero", "version": "0.1.3", - "description": "Knowledge management for Zotero", + "description": "Everything about note management. All in Zotero.", "main": "src/index.js", "scripts": { "build": "node build.js", @@ -13,14 +13,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/windingwind/Knowledge4Zotero.git" + "url": "git+https://github.com/windingwind/zotero-better-notes.git" }, "author": "windingwind", "license": "AGPL-3.0-or-later", "bugs": { - "url": "https://github.com/windingwind/Knowledge4Zotero/issues" + "url": "https://github.com/windingwind/zotero-better-notes/issues" }, - "homepage": "https://github.com/windingwind/Knowledge4Zotero#readme", + "homepage": "https://github.com/windingwind/zotero-better-notes#readme", "dependencies": { "@syncfusion/ej2-base": "^20.1.50", "@syncfusion/ej2-navigations": "^20.1.51", diff --git a/src/events.ts b/src/events.ts index 87ada8c..49cd766 100644 --- a/src/events.ts +++ b/src/events.ts @@ -179,7 +179,7 @@ class AddonEvents extends AddonBase { return; } else if (ids.length > 1) { this._Addon.views.showProgressWindow( - "Knowledge", + "Better Notes", "Please select a note item." ); return; @@ -194,7 +194,7 @@ class AddonEvents extends AddonBase { ); } else { this._Addon.views.showProgressWindow( - "Knowledge", + "Better Notes", "Not a valid note item." ); } @@ -212,13 +212,13 @@ class AddonEvents extends AddonBase { const item = Zotero.Items.get(itemID); if (itemID === mainKnowledgeID) { this._Addon.views.showProgressWindow( - "Knowledge", + "Better Notes", "Already a main Note." ); return; } else if (!item.isNote()) { this._Addon.views.showProgressWindow( - "Knowledge", + "Better Notes", "Not a valid note item." ); } else { @@ -236,7 +236,7 @@ class AddonEvents extends AddonBase { await this._Addon.knowledge.openWorkspaceWindow(); await this._Addon.knowledge.setWorkspaceNote("main"); this._Addon.views.showProgressWindow( - "Knowledge", + "Better Notes", `Set main Note to: ${item.getNoteTitle()}` ); } @@ -407,10 +407,12 @@ class AddonEvents extends AddonBase { params: {id, lineIndex} } */ + Zotero.debug(message.content.params); let editorInstance = await this._Addon.knowledge.getWorkspaceEditorInstance(); // Set node id this._Addon.knowledge.currentNodeID = parseInt(message.content.params.id); + this._Addon.views.updateEditCommand(); this._Addon.views.scrollToLine( editorInstance, // Scroll to 1 lines before the inserted line @@ -541,6 +543,90 @@ class AddonEvents extends AddonBase { Zotero.debug(`Knowledge4Zotero: line ${currentLineIndex} selected.`); this._Addon.knowledge.currentLine = currentLineIndex; } + } else if (message.type === "addHeading") { + /* + message.content = { + editorInstance + } + */ + const text = prompt(`Enter new heading to Insert:`); + this._Addon.knowledge.openWorkspaceWindow(); + if (text.trim()) { + if (this._Addon.knowledge.currentNodeID < 0) { + // Add a new H1 + this._Addon.knowledge.addSubLineToNote( + undefined, + `

${text}

`, + -1 + ); + return; + } + let node = this._Addon.knowledge.getNoteTreeNodeById( + undefined, + this._Addon.knowledge.currentNodeID + ); + this._Addon.knowledge.addSubLineToNote( + undefined, + `${text}`, + node.model.endIndex + ); + } + } else if (message.type === "indentHeading") { + /* + message.content = { + editorInstance + } + */ + if (this._Addon.knowledge.currentNodeID < 0) { + return; + } + let node = this._Addon.knowledge.getNoteTreeNodeById( + undefined, + this._Addon.knowledge.currentNodeID + ); + if (node.model.rank === 7) { + return; + } + if (node.model.rank === 6) { + this._Addon.views.showProgressWindow( + "Better Notes", + "Cannot decrease a level 6 Heading." + ); + return; + } + this._Addon.knowledge.changeHeadingLineInNote( + undefined, + 1, + node.model.lineIndex + ); + } else if (message.type === "unindentHeading") { + /* + message.content = { + editorInstance + } + */ + if (this._Addon.knowledge.currentNodeID < 0) { + return; + } + let node = this._Addon.knowledge.getNoteTreeNodeById( + undefined, + this._Addon.knowledge.currentNodeID + ); + if (node.model.rank === 7) { + return; + } + if (node.model.rank === 1) { + this._Addon.views.showProgressWindow( + "Better Notes", + "Cannot raise a level 1 Heading." + ); + return; + } + this._Addon.knowledge.changeHeadingLineInNote( + undefined, + -1, + node.model.lineIndex + ); } else if (message.type === "export") { /* message.content = { @@ -603,7 +689,7 @@ class AddonEvents extends AddonBase { } if (successCount === 0) { this._Addon.views.showProgressWindow( - "Knowledge", + "Better Notes", failCount ? "Error occurred on opening attachemnts." : "No attachment found.", diff --git a/src/knowledge.ts b/src/knowledge.ts index 93f5dd0..e12deb9 100644 --- a/src/knowledge.ts +++ b/src/knowledge.ts @@ -12,7 +12,7 @@ class Knowledge extends AddonBase { this.currentNodeID = -1; } - getWorkspaceNote() { + getWorkspaceNote(): ZoteroItem { return Zotero.Items.get( Zotero.Prefs.get("Knowledge4Zotero.mainKnowledgeID") ); @@ -353,7 +353,7 @@ class Knowledge extends AddonBase { true ); this._Addon.views.showProgressWindow( - "Knowledge", + "Better Notes", "Link is added to workspace" ); } @@ -596,6 +596,7 @@ class Knowledge extends AddonBase { saveNote: boolean = false, saveCopy: boolean = false ) { + note = note || this.getWorkspaceNote(); if (convertNoteLinks) { const noteID = await ZoteroPane_Local.newNote(); const item = Zotero.Items.get(noteID); @@ -619,7 +620,7 @@ class Knowledge extends AddonBase { [item], Zotero.Translators.TRANSLATOR_ID_MARKDOWN_AND_RICH_TEXT ); - this._Addon.views.showProgressWindow("Knowledge", "Note Copied"); + this._Addon.views.showProgressWindow("Better Notes", "Note Copied"); } if (!saveNote) { if (saveCopy) { diff --git a/src/views.ts b/src/views.ts index 41de7b1..2ecdf94 100644 --- a/src/views.ts +++ b/src/views.ts @@ -383,111 +383,11 @@ class AddonViews extends AddonBase { initKnowledgeWindow(_window: Window) { _window.addEventListener("message", (e) => this.messageHandler(e), false); this.currentOutline = OutlineType.treeView; - _window.document - .getElementById("outline-selectknowledge") - .addEventListener("click", async (e) => { - this._Addon.events.onEditorEvent( - new EditorMessage("selectMainKnowledge", {}) - ); - }); _window.document .getElementById("outline-switchview") .addEventListener("click", async (e) => { this.switchView(); }); - _window.document - .getElementById("outline-addafter") - .addEventListener("click", async (e) => { - let node = this._Addon.knowledge.getNoteTreeNodeById( - undefined, - this._Addon.knowledge.currentNodeID - ); - if (node.model.rank === 7) { - this.showProgressWindow("Knowledge", "Please select a Heading."); - return; - } - const text = prompt("Enter new heading:"); - this._Addon.knowledge.openWorkspaceWindow(); - if (text.trim()) { - if (this._Addon.knowledge.currentNodeID < 0) { - // Add a new H1 - this._Addon.knowledge.addSubLineToNote( - undefined, - `

${text}

`, - -1 - ); - return; - } - this._Addon.knowledge.addSubLineToNote( - undefined, - `${text}`, - node.model.endIndex - ); - } - }); - _window.document - .getElementById("outline-indent") - .addEventListener("click", async (e) => { - if (this._Addon.knowledge.currentNodeID < 0) { - this.showProgressWindow("Knowledge", "Please select a Heading."); - return; - } - let node = this._Addon.knowledge.getNoteTreeNodeById( - undefined, - this._Addon.knowledge.currentNodeID - ); - if (node.model.rank === 7) { - this.showProgressWindow("Knowledge", "Please select a Heading."); - return; - } - if (node.model.rank === 6) { - this.showProgressWindow( - "Knowledge", - "Cannot decrease a level 6 Heading." - ); - return; - } - this._Addon.knowledge.changeHeadingLineInNote( - undefined, - 1, - node.model.lineIndex - ); - }); - _window.document - .getElementById("outline-unindent") - .addEventListener("click", async (e) => { - if (this._Addon.knowledge.currentNodeID < 0) { - this.showProgressWindow("Knowledge", "Please select a Heading."); - return; - } - let node = this._Addon.knowledge.getNoteTreeNodeById( - undefined, - this._Addon.knowledge.currentNodeID - ); - if (node.model.rank === 7) { - this.showProgressWindow("Knowledge", "Please select a Heading."); - return; - } - if (node.model.rank === 1) { - this.showProgressWindow( - "Knowledge", - "Cannot raise a level 1 Heading." - ); - return; - } - this._Addon.knowledge.changeHeadingLineInNote( - undefined, - -1, - node.model.lineIndex - ); - }); - _window.document - .getElementById("user-guide") - .addEventListener("click", async (e) => { - this._Addon.events.onEditorEvent( - new EditorMessage("openUserGuide", {}) - ); - }); _window.addEventListener("resize", (e) => this.resizeOutline(_window)); } @@ -548,6 +448,9 @@ class AddonViews extends AddonBase { mindmap.append(iframe); this.resizeOutline(_window); this.updateOutline(); + // Clear stored node id + this._Addon.knowledge.currentNodeID = -1; + this.updateEditCommand(); } async updateOutline() { @@ -577,6 +480,41 @@ class AddonViews extends AddonBase { } } + updateEditCommand() { + const _window = this._Addon.knowledge.getWorkspaceWindow(); + Zotero.debug(`updateEditMenu, ${this._Addon.knowledge.currentNodeID}`); + if (this._Addon.knowledge.currentNodeID < 0) { + _window.document + .getElementById("cmd_indent") + .setAttribute("disabled", true); + _window.document + .getElementById("cmd_unindent") + .setAttribute("disabled", true); + } else { + _window.document.getElementById("cmd_indent").removeAttribute("disabled"); + _window.document + .getElementById("cmd_unindent") + .removeAttribute("disabled"); + } + } + + updateViewMenu() { + const _window = this._Addon.knowledge.getWorkspaceWindow(); + Zotero.debug(`updateViewMenu, ${this.currentOutline}`); + const treeview = _window.document.getElementById("menu_treeview"); + this.currentOutline === OutlineType.treeView + ? treeview.setAttribute("checked", true) + : treeview.removeAttribute("checked"); + const mindmap = _window.document.getElementById("menu_mindmap"); + this.currentOutline === OutlineType.mindMap + ? mindmap.setAttribute("checked", true) + : mindmap.removeAttribute("checked"); + const bubblemap = _window.document.getElementById("menu_bubblemap"); + this.currentOutline === OutlineType.bubbleMap + ? bubblemap.setAttribute("checked", true) + : bubblemap.removeAttribute("checked"); + } + showProgressWindow( header: string, context: string, diff --git a/src/wizard.ts b/src/wizard.ts index cbc9ad0..087ff01 100644 --- a/src/wizard.ts +++ b/src/wizard.ts @@ -14,8 +14,8 @@ class AddonWizard extends AddonBase { this.enableCollection = true; this.collectionName = ""; this.enableNote = true; - this.template = `

Knowledge for Zotero User Guide: Workflow

\n

Welcome to Knowledge for Zotero !

\n

This note helps you quickly learn how to use this addon in 3 min!

\n

Let's start now.

\n

View documentation with images on GitHub: User Guide(EN) | User Guide(CN)

\n

1 What is Knowledge

\n

Knowledge is an extension of Zotero's built-in note function.

\n

Zotero's note is much like a markdown/rich-text editor. You can edit the format with the tools above⬆️.

\n

1.1 Workspace Window

\n

The knowledge workspace window contains an outline area(left side⬅️), the main note area, and the preview area(right side➡️).

\n

|---------------||----------------||----------------|

\n

|                  ||                  ||                  |

\n

|    Outline    ||  Main Note  ||   Preview    |

\n

|                  ||                  ||                  |

\n

|------------ --||---------------||----------------|

\n

Open workspace by clicking the 'Open Workspace' line above the 'My Library' line in Zotero main window. Alternatively, open it with the '🏠home' button on the top-left of note editors.

\n

\n

1.2 Main note

\n

This addon uses a Zotero note item as the main note. It will show up on the main area of the workspace window.

\n

All links will be added to the main note.

\n

Change the main note with the '📂folder' button on the bottom of the outline area(left side⬅️).

\n

\n

2 Gather Ideas to Main Note

\n

2.1 From Note

\n

Select a note outside the workspace window(in Zotero items view or PDF viewer), you may realize a button with the addon's icon on the top of the note editor toolbar.

\n

Click it, the current note link will be inserted into the main note's cursor position;

\n

Select a heading, the note's link will be inserted into the end of this heading.

\n
\n

💡 Try it now!

\n

Open a PDF and open/create a note(in the right side bar of PDF viewer). Add a link below.

\n
\n

\n

2.1.1 INSERT HERE

\n

You can insert the link here.

\n

\n

2.2 From Annotation

\n

You can find a button with the addon's icon on every annotation(in the left sidebar of PDF viewer).

\n

Click it, and a new note with this annotation will be created under the PDF item. You can also add the link to the main note in the note editor.

\n
\n

💡 Try it now!

\n

Open a PDF and open/create an annotation(in the left sidebar of PDF viewer). Add a link.

\n
\n

\n

3 Check Linked Notes in Workspace Window

\n

3.1 View Linked Notes

\n

Suppose you have added a lot of links to the main note. Now, it's time to view what you've got.

\n

Go back to the workspace window.

\n

Click links, the linked note will show up in the preview area(right side➡️).

\n
\n

💡 Try it now!

\n

Open a note link.

\n
\n

3.2 View Linked Note's PDF

\n

Click the '📄PDF' button on the top-left of the preview area.

\n
\n

💡 Try it now!

\n

Open a linked note's PDF.

\n
\n

\n

4 Outline Mode

\n

Switch the outline mode with the '📊mode' button on the bottom of the outline area.

\n
\n

💡 Try it now!

\n

Try different outline modes.

\n
\n

\n

5 Export

\n

Click the '⬆️export' button on the top-right of the main note area. Choose a format to export, e.g. MarkDown.

\n

If you are using MS Word/OneNote, export to clipboard and paste there.

\n
\n

💡 Try it now!

\n

Export this main note!

\n
\n

\n

6 Start a New Job

\n

After the export, you may want to start a new job with a new empty main note.

\n

Create a note and right-click to set it as the main note, or just create a new main note.

\n

Switch between different main notes with the '📂folder' button on the bottom of the outline area.

\n
\n

✨ Hint

\n

Create a new collection and save all main notes there is the best way to manage them.

\n

The user guide should have done this for you.

\n
\n

\n

Congratulations!

\n

You can select a new main note and start working with Knowledge for Zotero now. Have fun!

\n

\n

\n
`; - this.templateCN = `

Knowledge for Zotero 用户指引:工作流

\n

欢迎使用 Knowledge for Zotero !

\n

本笔记帮助您在3分钟内快速学习如何使用此插件!

\n

现在开始吧。

\n

在GitHub上阅读带有图片的文档: User Guide(EN) | 用户指引(中文)

\n

1 认识 Knowledge

\n

Knowledge是Zotero内置note功能的扩展。

\n

Zotero的note很像一个标记/富文本编辑器。您可以使用上方工具编辑格式⬆️。

\n

1.1 工作区窗口

\n

知识工作区窗口包含一个大纲区域(左侧⬅️),主笔记区域和预览区域(右侧➡️)。

\n

|---------------||----------------||----------------|

\n

|                  ||                  ||                  |

\n

|      大纲     ||    主笔记     ||      预览      |

\n

|                  ||                  ||                  |

\n

|------------ --||---------------||----------------|

\n

在Zotero主窗口中单击“我的文库”上方的“Open Workspace”来打开工作区。或者,用笔记编辑器左上角的“🏠主页”按钮.

\n

\n

1.2 主笔记

\n

这个插件使用某一个Zotero note作为主笔记。它将显示在工作区窗口的主笔记区域。

\n

所有链接都将添加到主笔记中。

\n

点击位于大纲区域左下方的📂“文件夹”按钮 来选择不同的note作为主笔记。

\n

\n

2 在主笔记中收集想法

\n

2.1 从Note

\n

在工作区窗口外选择一个note(在Zotero 条目视图或PDF阅读器中),您会在笔记编辑器工具栏顶部看到一个带有本插件图标的按钮

\n

点击它,当前笔记的链接将插入主笔记的光标位置;

\n

选择一个标题层级,笔记的链接将插入该标题的末尾。

\n
\n

💡 尝试一下!

\n

打开PDF并打开/创建笔记(在PDF 阅读器的右侧栏中)。用上面的方法在这条主笔记添加一个链接。

\n
\n

\n

2.1.1 用来插入链接的位置

\n

你可以在这里插入链接。

\n

\n

2.2 从Annotation(批注高亮)

\n

你可以在每个批注上找到一个带有插件图标的按钮(在PDF 阅读器的左侧栏中)。

\n

单击它,PDF项目下将创建一个带有此批注的新笔记。也可以在打开的笔记编辑器中将链接添加到主笔记。

\n
\n

💡 尝试一下!

\n

打开PDF并打开/创建批注高亮(在PDF 阅读器的左侧栏中)。用上面的方法在这条主笔记添加一个链接。

\n
\n

\n

3 查看工作区窗口中的链接笔记

\n

3.1 查看链接笔记

\n

假设你已经在主笔记添加了很多的链接。现在,是时候看看你的结果了。

\n

返回工作区窗口。

\n

单击链接,链接的笔记将显示在预览区域(右侧➡️)。

\n
\n

💡 尝试一下!

\n

在工作区窗口打开一个笔记链接。

\n
\n

3.2 查看链接笔记的 PDF

\n

在上一步打开的预览笔记中,点击预览区左上角的“📄PDF”按钮

\n
\n

💡尝试一下!

\n

打开一个链接笔记的 PDF。

\n
\n

\n

4 大纲视图

\n

点击大纲区域左下角的 ‘📊大纲模式‘ 按钮 来切换大纲视图模式。

\n
\n

💡 尝试一下!

\n

尝试不同的大纲模式(思维导图)

\n
\n

\n

5 导出

\n

点击主笔记区域右上角的“⬆️导出”按钮。选择要导出的格式,比如MarkDown。

\n

如果您使用的是MS Word/OneNote,请导出到剪贴板并粘贴到那里。

\n
\n

💡 尝试一下!

\n

导出这个主笔记!

\n
\n

\n

6 开始新的任务

\n

导出后,您可能希望使用新的空主笔记开始新任务。

\n

创建一个note笔记,然后右键单击将其设置为主笔记;或者直接创建一个新的主笔记。

\n

使用大纲区域底部的“📂文件夹”按钮切换不同的主笔记。

\n
\n

✨ 提示

\n

创建一个新的文件夹并在其中专门保存所有的主笔记——这是管理主笔记的最佳方法。

\n

用户指引应该已经为您做到了这一点。

\n
\n

\n

恭喜!

\n

你现在可以选择或新建一个主笔记,然后开始使用 Knowledge for Zotero了。用的开心!

\n

\n

\n
`; + this.template = `

Zotero Better Notes User Guide: Workflow

\n

Welcome to Zotero Better Notes !

\n

This note helps you quickly learn how to use this addon in 3 min!

\n

Let's start now.

\n

View documentation with images on GitHub: User Guide(EN) | User Guide(CN)

\n

1 What is Knowledge

\n

Knowledge is an extension of Zotero's built-in note function.

\n

Zotero's note is much like a markdown/rich-text editor. You can edit the format with the tools above⬆️.

\n

1.1 Workspace Window

\n

The knowledge workspace window contains an outline area(left side⬅️), the main note area, and the preview area(right side➡️).

\n

|---------------||----------------||----------------|

\n

|                  ||                  ||                  |

\n

|    Outline    ||  Main Note  ||   Preview    |

\n

|                  ||                  ||                  |

\n

|------------ --||---------------||----------------|

\n

Open workspace by clicking the 'Open Workspace' line above the 'My Library' line in Zotero main window. Alternatively, open it with the '🏠home' button on the top-left of note editors.

\n

\n

1.2 Main note

\n

This addon uses a Zotero note item as the main note. It will show up on the main area of the workspace window.

\n

All links will be added to the main note.

\n

Change the main note with the '📂folder' button on the bottom of the outline area(left side⬅️).

\n

\n

2 Gather Ideas to Main Note

\n

2.1 From Note

\n

Select a note outside the workspace window(in Zotero items view or PDF viewer), you may realize a button with the addon's icon on the top of the note editor toolbar.

\n

Click it, the current note link will be inserted into the main note's cursor position;

\n

Select a heading, the note's link will be inserted into the end of this heading.

\n
\n

💡 Try it now!

\n

Open a PDF and open/create a note(in the right side bar of PDF viewer). Add a link below.

\n
\n

\n

2.1.1 INSERT HERE

\n

You can insert the link here.

\n

\n

2.2 From Annotation

\n

You can find a button with the addon's icon on every annotation(in the left sidebar of PDF viewer).

\n

Click it, and a new note with this annotation will be created under the PDF item. You can also add the link to the main note in the note editor.

\n
\n

💡 Try it now!

\n

Open a PDF and open/create an annotation(in the left sidebar of PDF viewer). Add a link.

\n
\n

\n

3 Check Linked Notes in Workspace Window

\n

3.1 View Linked Notes

\n

Suppose you have added a lot of links to the main note. Now, it's time to view what you've got.

\n

Go back to the workspace window.

\n

Click links, the linked note will show up in the preview area(right side➡️).

\n
\n

💡 Try it now!

\n

Open a note link.

\n
\n

3.2 View Linked Note's PDF

\n

Click the '📄PDF' button on the top-left of the preview area.

\n
\n

💡 Try it now!

\n

Open a linked note's PDF.

\n
\n

\n

4 Outline Mode

\n

Switch the outline mode with the '📊mode' button on the bottom of the outline area.

\n
\n

💡 Try it now!

\n

Try different outline modes.

\n
\n

\n

5 Export

\n

Click the '⬆️export' button on the top-right of the main note area. Choose a format to export, e.g. MarkDown.

\n

If you are using MS Word/OneNote, export to clipboard and paste there.

\n
\n

💡 Try it now!

\n

Export this main note!

\n
\n

\n

6 Start a New Job

\n

After the export, you may want to start a new job with a new empty main note.

\n

Create a note and right-click to set it as the main note, or just create a new main note.

\n

Switch between different main notes with the '📂folder' button on the bottom of the outline area.

\n
\n

✨ Hint

\n

Create a new collection and save all main notes there is the best way to manage them.

\n

The user guide should have done this for you.

\n
\n

\n

Congratulations!

\n

You can select a new main note and start working with Zotero Better Notes now. Have fun!

\n

\n

\n
`; + this.templateCN = `

Zotero Better Notes 用户指引:工作流

\n

欢迎使用 Zotero Better Notes !

\n

本笔记帮助您在3分钟内快速学习如何使用此插件!

\n

现在开始吧。

\n

在GitHub上阅读带有图片的文档: User Guide(EN) | 用户指引(中文)

\n

1 认识 Knowledge

\n

Knowledge是Zotero内置note功能的扩展。

\n

Zotero的note很像一个标记/富文本编辑器。您可以使用上方工具编辑格式⬆️。

\n

1.1 工作区窗口

\n

知识工作区窗口包含一个大纲区域(左侧⬅️),主笔记区域和预览区域(右侧➡️)。

\n

|---------------||----------------||----------------|

\n

|                  ||                  ||                  |

\n

|      大纲     ||    主笔记     ||      预览      |

\n

|                  ||                  ||                  |

\n

|------------ --||---------------||----------------|

\n

在Zotero主窗口中单击“我的文库”上方的“Open Workspace”来打开工作区。或者,用笔记编辑器左上角的“🏠主页”按钮.

\n

\n

1.2 主笔记

\n

这个插件使用某一个Zotero note作为主笔记。它将显示在工作区窗口的主笔记区域。

\n

所有链接都将添加到主笔记中。

\n

点击位于大纲区域左下方的📂“文件夹”按钮 来选择不同的note作为主笔记。

\n

\n

2 在主笔记中收集想法

\n

2.1 从Note

\n

在工作区窗口外选择一个note(在Zotero 条目视图或PDF阅读器中),您会在笔记编辑器工具栏顶部看到一个带有本插件图标的按钮

\n

点击它,当前笔记的链接将插入主笔记的光标位置;

\n

选择一个标题层级,笔记的链接将插入该标题的末尾。

\n
\n

💡 尝试一下!

\n

打开PDF并打开/创建笔记(在PDF 阅读器的右侧栏中)。用上面的方法在这条主笔记添加一个链接。

\n
\n

\n

2.1.1 用来插入链接的位置

\n

你可以在这里插入链接。

\n

\n

2.2 从Annotation(批注高亮)

\n

你可以在每个批注上找到一个带有插件图标的按钮(在PDF 阅读器的左侧栏中)。

\n

单击它,PDF项目下将创建一个带有此批注的新笔记。也可以在打开的笔记编辑器中将链接添加到主笔记。

\n
\n

💡 尝试一下!

\n

打开PDF并打开/创建批注高亮(在PDF 阅读器的左侧栏中)。用上面的方法在这条主笔记添加一个链接。

\n
\n

\n

3 查看工作区窗口中的链接笔记

\n

3.1 查看链接笔记

\n

假设你已经在主笔记添加了很多的链接。现在,是时候看看你的结果了。

\n

返回工作区窗口。

\n

单击链接,链接的笔记将显示在预览区域(右侧➡️)。

\n
\n

💡 尝试一下!

\n

在工作区窗口打开一个笔记链接。

\n
\n

3.2 查看链接笔记的 PDF

\n

在上一步打开的预览笔记中,点击预览区左上角的“📄PDF”按钮

\n
\n

💡尝试一下!

\n

打开一个链接笔记的 PDF。

\n
\n

\n

4 大纲视图

\n

点击大纲区域左下角的 ‘📊大纲模式‘ 按钮 来切换大纲视图模式。

\n
\n

💡 尝试一下!

\n

尝试不同的大纲模式(思维导图)

\n
\n

\n

5 导出

\n

点击主笔记区域右上角的“⬆️导出”按钮。选择要导出的格式,比如MarkDown。

\n

如果您使用的是MS Word/OneNote,请导出到剪贴板并粘贴到那里。

\n
\n

💡 尝试一下!

\n

导出这个主笔记!

\n
\n

\n

6 开始新的任务

\n

导出后,您可能希望使用新的空主笔记开始新任务。

\n

创建一个note笔记,然后右键单击将其设置为主笔记;或者直接创建一个新的主笔记。

\n

使用大纲区域底部的“📂文件夹”按钮切换不同的主笔记。

\n
\n

✨ 提示

\n

创建一个新的文件夹并在其中专门保存所有的主笔记——这是管理主笔记的最佳方法。

\n

用户指引应该已经为您做到了这一点。

\n
\n

\n

恭喜!

\n

你现在可以选择或新建一个主笔记,然后开始使用 Zotero Better Notes了。用的开心!

\n

\n

\n
`; } init(_document: Document) { this._document = _document; diff --git a/update.rdf b/update.rdf index 904d07d..81cf05a 100644 --- a/update.rdf +++ b/update.rdf @@ -11,7 +11,7 @@ zotero@chnm.gmu.edu 5.0 * - https://github.com/windingwind/Knowledge4Zotero/releases/latest/download/knowledge-for-zotero.xpi + https://github.com/windingwind/zotero-better-notes/releases/latest/download/zotero-better-notes.xpi
@@ -19,7 +19,7 @@ juris-m@juris-m.github.io 5.0 * - https://github.com/windingwind/Knowledge4Zotero/releases/latest/download/knowledge-for-zotero.xpi + https://github.com/windingwind/zotero-better-notes/releases/latest/download/zotero-better-notes.xpi