fix global ko references

This commit is contained in:
zadam
2019-08-25 22:31:02 +02:00
parent bbe0e9e425
commit 8e4e0bd543
4 changed files with 33 additions and 32 deletions

View File

@@ -94,20 +94,6 @@ function addTextToEditor(text) {
}
}
function init() {
ko.bindingHandlers.noteLink = {
init: async function(element, valueAccessor, allBindings, viewModel, bindingContext) {
const noteId = ko.unwrap(valueAccessor());
if (noteId) {
const link = await createNoteLink(noteId);
$(element).append(link);
}
}
};
}
function tabContextMenu(e) {
const $link = $(e.target);
@@ -175,6 +161,5 @@ export default {
createNoteLink,
addLinkToEditor,
addTextToEditor,
init,
goToLink
};