mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-02 05:02:27 +08:00
23 lines
502 B
JavaScript
23 lines
502 B
JavaScript
function Api() {
|
|
const $pluginButtons = $("#plugin-buttons");
|
|
|
|
async function activateNote(notePath) {
|
|
await noteTree.activateNode(notePath);
|
|
}
|
|
|
|
function addButtonToToolbar(buttonId, button) {
|
|
$("#" + buttonId).remove();
|
|
|
|
button.attr('id', buttonId);
|
|
|
|
$pluginButtons.append(button);
|
|
}
|
|
|
|
return {
|
|
__modules: {},
|
|
__notes: {},
|
|
addButtonToToolbar,
|
|
activateNote,
|
|
getInstanceName: noteTree.getInstanceName
|
|
}
|
|
} |