Search existing topics when hyperlinking

Hi everyone, if I may give you a suggestion.

When in editor and hyperlinking a word in a post, it would be a great idea to write a word/keys and dynamically search for matching topics. Because I’m finding myself linking references to other topics.

I saw a similar feature on some wordpress plugins, to easily put anchors and relate content.

20

11 Likes

This is a duplicate of some other requests:
:lock: Insert internal link like Wordpress
:lock: Fast way to link to existing topic?
:unlock: https://meta.discourse.org/t/how-about-mentioning-topic-feature/7350

You can kind of do something similar when composing by opening the header search, typing your query, using the down arrow to select the topic you want, and then hitting a to insert the link into the composer (totally recognize that it’s a power-user feature, and something in the hyperlink modal would be much more discoverable).

7 Likes

:confetti_ball: This feature has been added to core just a few minutes ago.

16 Likes

I hate to be “that guy” but I think category and tags need to appear there as well?

4 Likes

Also the closed icon/solved icon and so on like search shows. Basically the same as search, minus the excerpt in one line.

3 Likes

This has been updated, with support for categories, tags and topic status (closed/solved/pinned and so on).

11 Likes

This is one of the most useful features in discourse enabling much easier cross linking between topics.

A question: how hard would it be to implement a cross site search in this feature. For example searching an external help docs site as well and allowing searching that content as well and linking to it.

1 Like

Currently, this isn’t set up to be extended to include other search results. I suppose a plugin could extend that route and return other results, but it’s likely not a trivial change.

I didn’t think it would be. Is the indexing tech repointable to a different site in a plugin?