Make unlinked mentions clickable in the editor


The “outgoing links” core plugin automatically detects unlinked mentions of other pages on the current page. However it requires you to manually choose to convert those mentions into [[wikilinks]].

Proposed solution

Given we already know what unlinked mentions we have, we should be able to show them as clickable links in the editor, treating them as though they are wikilinks without modifying the markdown.

Benefits of this feature

  • There’d be less manual effort involved in linking between pages.
  • We’d be reminded of the pages we already have as we type, in a way that is more noticeable than having them show up in a side panel.
  • Link density would be higher, improving the discoverability and utility of our notes.
  • Since we would not be automatically inserting wikilinks, the functionality is non-invasive/reversible, and false positive links would not cause lasting harm.

Potential shortcomings of this feature

  • There would be false positives. Unlinked mentions in the outgoing links plugin already contain false positives, but it might be more annoying to have them in the editor.
    • Nico Nico Pedia (sample page) has an implementation of this proposal. Apologies for it being in Japanese (I’m not aware of any English implementations). If you translate the page using your browser’s translation feature, you can get a sense of the false positives they have.
  • The links would not work outside Obsidian, since they’re not marked in the underlying markdown in any way.
  • There would be collisions (a partial or full overlap in page names leading to multiple possible link destinations). We could take a greedy, best-effort approach here, and the user can explicitly use a wikilink if they want to specify which page to link to.
  • If we make these links show up in the graph view there would be false positives, and if we don’t then the graph view would be less useful than when the user is manually inserting links.
  • The user would have less control over when not to link.

Related feature requests

Related scripts

Please let me know if this can be done through a plugin (Is it possible for a plugin to manipulate the editor DOM?) – thanks!

Another potential shortcoming might be performance. I think the unlinked mentions feature essentially performs a search each time you use it. Altho this would be more like running Quick Open on every single word and consecutive combination of words in the note.

Alternate proposals:

  • Run link autosuggestion on all typing.
  • If text is selected when Quick Open is run, pre-fill it with the selected text like in-page search does (this won’t remind you of existing pages as you type, tho).

I personally wouldn’t want the original proposed feature (or autosuggestion on all typing), but I can see how someone might.

1 Like