Merge branch 'stable'

# Conflicts:
#	src/public/javascripts/dialogs/add_link.js
This commit is contained in:
zadam
2019-05-13 21:42:52 +02:00
2 changed files with 4 additions and 7 deletions

View File

@@ -93,15 +93,16 @@ $form.submit(() => {
$dialog.modal('hide');
const linkHref = '#' + notePath;
const editor = noteDetailService.getActiveComponent().getEditor();
if (hasSelection()) {
const editor = noteDetailService.getActiveComponent().getEditor();
editor.execute('link', linkHref);
}
else {
linkService.addLinkToEditor(linkTitle, linkHref);
}
editor.editing.view.focus();
}
else if (linkType === 'selected-to-active') {
const prefix = $clonePrefix.val();
@@ -144,10 +145,6 @@ function linkTypeChanged() {
$linkTypes.change(linkTypeChanged);
// return back focus to note text detail after quitting add link
// the problem is that cursor position is reset
$dialog.on("hidden.bs.modal", () => noteDetailService.getActiveComponent().focus());
export default {
showDialog,
showDialogForClone