English | 简体中文
You can easily connect your Anki notes together by this add-on, forming a web of interconnected information. By establishing links between relevant notes, you can create a comprehensive and organized knowledge base that reflects the relationships between various concepts, ideas, and topics.
[Link Title|nidxxxxxxxxxxxxx]
The link title is the content displayed in the card. If the title contains[
, it needs to be escaped with\[
x
is the ID of the note, consisting of 13 digits
Copy the ID of the current note in the editor by using the right-click menu or pressing Alt+Shift+C
Copy the link of the current note in the editor by using the right-click menu or pressing Alt+Shift+L
Generate a link from the note ID in the clipboard and the currently selected text by either using the right-click menu or pressing Alt+Shift+V
Generate a new link from the currently selected text by either using the right-click menu or pressing Alt+Shift+N
Double-clicking the generated link allows adding a corresponding new note
Generate a link template from the currently selected text by either using the right-click menu or pressing Alt+Shift+T
The generated link template looks like this: [selected text|nid]
, you need to manually complete it
Note: If no text is selected, using the above actions will generate a link without a title
Open current note in new window by using the right-click menu or pressing Alt+Shift+W
Double click link
to open the corresponding note in a new window
Left click link
to open the corresponding note in the current window
Right click link
to open the corresponding note in a new window
Middle click link
to open the corresponding note in the browser (unsupported in graph view)
Left click link
to open the corresponding note in an editor window
Right click link
to open the corresponding note in a previewer window
Entrance: Menu -> Anki Note Linker -> Global Relationship Graph (Experimental)
Please set the video driver in Anki preference to an option other than Software
, as it can significantly decrease graphic performance
You can customize the shortcut keys according to your preferences in add-on configuration
If there is no response when using the shortcut key, it may be due to a shortcut key conflict. Please try changing the shortcut key
This add-on automatically renders note links as corresponding content. However, without the add-on, the links will not be rendered, such as on mobile devices
If you have generated note links and need to use them without the add-on, you can follow the steps below to operate:
- In the card template, add a
class
attribute"linkRender"
to each note field, you can also customize its name
<div class="linkRender">{{Front}}</div>
<div class="linkRender">{{Back}}</div>
<!-- If the field already has a class attribute,
you can use a space to separate the new attribute from the original one -->
<div class="otherClassName linkRender">{{Addition}}</div>
- Copy the following code to the end of the card template
<script>
function renderLinks(_) {
for (const element of document.getElementsByClassName("linkRender")) {
element.innerHTML = element.innerHTML.replace(
/\[((?:[^\[]|\\\[)*)\|nid\d{13}\]/g,
(match, title) => title.replace(/\\\[/g, '[')
)
}
}
try { AnkiNoteLinkerIsActive } catch (err) {
if (document.readyState !== "loading") renderLinks(null)
else document.addEventListener("DOMContentLoaded", renderLinks, { once: true })
}
</script>
After completing these operations, Anki will automatically display the correct note content without this add-on
This add-on is inspired by Obsidian
The following projects were used in this project:
The implementation of this add-on is inspired by the following add-ons:
Add-on code:1077002392