Conversation
| const linkTitle = this.getLinkType() === 'reference-link' ? null : this.$linkTitle.val(); | ||
|
|
||
| this.textTypeWidget.addLink(this.$autoComplete.getSelectedNotePath(), linkTitle); | ||
| if (this.textTypeWidget) { |
There was a problem hiding this comment.
This check appears to be needed because in the context of a script extension theremay not be a textTypeWidget.
| this.textTypeWidget.addLink(this.$autoComplete.getSelectedNotePath(), linkTitle); | ||
| } | ||
| if (this.resolve) { | ||
| this.resolve({ |
|
|
||
| noteAutocompleteService.initNoteAutocomplete(this.$autoComplete, { | ||
| allowExternalLinks: true, | ||
| allowExternalLinks: false, |
There was a problem hiding this comment.
@zadam when using the text editor control+L (i.e. using this dialog directly) I was never actually able to get an external link selected. Are we best off disabling it here, or should we fix external link selection inside the note selector?
|
@benkaiser I don't like that the Add Link dialog now does two things - it inserts the link into the text note AND resolves the link. What if you just want the latter and not the former? Add Link dialog is also more specialized than mere selecting note (it allows defining a different link title) What I thought you want to do is to create a pure note selection dialog ... Alternatively, the Add Link dialog could be generalized in the sense that it would just resolve the selected note / title, and then the triggering code would handle inserting the content into the text note. |
We would like to allow users with custom scripts to leverage the internal note selector interface. This allows for easily creating links to internal notes from custom rendered views.
Fixes #4395 .