add link disables HTML link when in code note (plus some related refactorings)

This commit is contained in:
azivner
2018-01-23 20:14:10 -05:00
parent 403cf02ea7
commit 8adb31757f
2 changed files with 37 additions and 10 deletions

View File

@@ -190,6 +190,12 @@ const noteEditor = (function() {
}
}
function getCurrentNoteType() {
const currentNote = getCurrentNote();
return currentNote ? currentNote.detail.type : null;
}
$(document).ready(() => {
noteTitleEl.on('input', () => {
noteChanged();
@@ -239,6 +245,7 @@ const noteEditor = (function() {
setNoteBackgroundIfProtected,
loadNote,
getCurrentNote,
getCurrentNoteType,
getCurrentNoteId,
newNoteCreated,
getEditor,