mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
21 lines
423 B
JavaScript
21 lines
423 B
JavaScript
|
|
const api = (function() {
|
||
|
|
const pluginButtonsEl = $("#plugin-buttons");
|
||
|
|
|
||
|
|
async function activateNote(notePath) {
|
||
|
|
await noteTree.activateNode(notePath);
|
||
|
|
}
|
||
|
|
|
||
|
|
function addButtonToToolbar(buttonId, button) {
|
||
|
|
$("#" + buttonId).remove();
|
||
|
|
|
||
|
|
button.attr('id', buttonId);
|
||
|
|
|
||
|
|
pluginButtonsEl.append(button);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
return {
|
||
|
|
addButtonToToolbar,
|
||
|
|
activateNote
|
||
|
|
}
|
||
|
|
})();
|