mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 18:05:55 +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
|
|
}
|
|
})(); |