trilium/src/public/javascripts/api.js

21 lines
421 B
JavaScript
Raw Normal View History

2018-02-03 23:37:57 +08:00
const api = (function() {
2018-02-15 12:31:20 +08:00
const $pluginButtons = $("#plugin-buttons");
2018-02-03 23:37:57 +08:00
async function activateNote(notePath) {
await noteTree.activateNode(notePath);
}
function addButtonToToolbar(buttonId, button) {
$("#" + buttonId).remove();
button.attr('id', buttonId);
2018-02-15 12:31:20 +08:00
$pluginButtons.append(button);
2018-02-03 23:37:57 +08:00
}
return {
addButtonToToolbar,
activateNote
}
})();