add links in ckeditor

This commit is contained in:
azivner
2017-12-09 14:11:35 -05:00
parent 7ca043ebc6
commit d2a5921489
9 changed files with 18 additions and 45 deletions

View File

@@ -7,8 +7,6 @@ const jumpToNote = (function() {
const noteDetailEl = $('#note-detail');
async function showDialog() {
noteDetailEl.summernote('editor.saveRange');
glob.activeDialog = dialogEl;
autoCompleteEl.val('');
@@ -58,15 +56,9 @@ const jumpToNote = (function() {
if (notePath) {
dialogEl.dialog("close");
noteDetailEl.summernote('editor.restoreRange');
const noteId = treeUtils.getNoteIdFromNotePath(notePath);
noteDetailEl.summernote('createLink', {
text: noteTree.getNoteTitle(noteId),
url: 'app#' + notePath,
isNewWindow: true
});
link.addLinkToEditor(noteTree.getNoteTitle(noteId), '#' + notePath);
}
}
else if (action === 'add-current-as-child') {