Suggestion - link to existing content faster from the url button

With all the smoothness of Discourse, I’m surprised this doesn’t already exist (it exists in Wordpress - you know, that ugl…wonderfully coded thing).

I many times link to existing topics on our Discourse installation, and I have to navigate to it, copy the link to clipboard, come to the new post and paste it. When pressing the Hyperlink button, could we have an inline search like we have with the “Tags” box for titles? Start typing a few letters and get a list of matching topics that we can just select? That would be awesome and helpful.

p.s. Or is there a plugin for this already?

2 Likes

This has been discussed many times. You should be able to find the discussion with a search. I think it’s just that it’s harder than it seems. You can navigate to the topic while you are composing and even quote from it, so you don’t have to navigate back.

2 Likes

At https://meta.discourse.org/t/how-about-mentioning-topic-feature/7350/2 we discuss this power user feature, where you can press CTRL+ALT+F while composing a post, type your search, select the match with or and then press A to insert it on the composer.

I created the link above using it.

6 Likes

Wow. I missed that. The post you linked to says

Which doesn’t really explain the secret shortcut you describe. :wink:

If you scroll down there you get to

https://meta.discourse.org/t/how-about-mentioning-topic-feature/7350/44?u=falco

2 Likes

I for one am a now a big fan of the secret shortcut. Now if only it could also search the github repo so that I could quickly link to INSTALL_cloud. Maybe CTRL-ALT-SUPER-F could search that too. :wink:

2 Likes

I know you are joking but that is actually possible with a plugin, and @vinothkannans created just that for a customer :exploding_head:.

Basically on search you hit an external service, and merge the results in the search results.

6 Likes

Very cool!

Actually, what would be cool and pretty easy here is that replace-a-word theme that would re-write INSTALL-cloud (and something for the EMAIL-cloud or whatever that is) as a link to the install document. Several hundred times a week, I have to track down that link. :slight_smile:

3 Likes

I think a transparent inline search with suggestions like the Tags box (with a longer delay after last keypress, if we’re worried about traffic/cpu) is much better than a secret shortcut. Anyone else? Is there a chance it will get implemented?

2 Likes

I’d support this, although it probably only make sense as a plugin or behind a site setting. It would be super useful for example in Wiki categories.

1 Like

Shortcut works for me, but we should definitely publicise it.

Something discobot could teach?

Shortcuts are great. What I don’t dig is shortcuts that accomplish things you can’t do from the UI.

Also, I just tried to click ctrl alt f on my phone, but I couldn’t.

3 Likes

I really like in-line cause I don’t have to jump around as much, but finding a trigger here is ultra hard, all the good ones are taken.

Maybe #howto:search #howto:”search here” could work, not sure, recommend somebody from the wider community experiments in a theme component

Why not just making it a part of the link modal that you open with Ctrl + K?

4 Likes

I was initially suggesting that it could be first implemented for the “Insert hyperlink” button. Click/tap that, start typing in the box and get auto-completion … why hasn’t that been a thing for Discourse when it has been for ages for Shartpress? :smile: You don’t need any triggers there and should be easy to get going (famous last words?).

That would be a great start, and better than the current option.

3 Likes

Right but that changes the semantics of “Insert Link” considerably. It becomes "Insert Link… to this forum!"

It’s not a bad idea, I do like that it puts the functionality into an existing dialog, but it would be … weird. I am linking to the outside web way more than I am linking internally to meta, for example.

You’re not forced to insert any of the suggested entries. In my first post I was pointing to the fact that you guys literally implemented exactly that for the "Optional tags +" box in the “Edit title” (where you can create a new tag if none of the matching ones that it suggests in the dropdown as you type are appealing). You could do the same for the Insert hyperlink box:

  • click “Insert hyperlink”
  • start typing
  • open underneath a dropdown list of matching existing topics
  • continue typing and ignore dropdown if not interested
  • pick an entry from the dropdown if interested

Win-win as far as I can see.

1 Like

Part of the issue here that has gone unmentioned is that typically internal URLs are preferable to onebox, not link.

It’s much better to show readers the destination, after all.

1 Like

The Wordpress functionality really works quite well in this regard. You don’t have to choose between internal and external, nor does it assume one or the other.

If you’re inserting an external link, you’re generally not going to be typing it, but pasting it. If a link gets pasted in, don’t bother to search. If words start getting typed, run a live search for suggestions.

Not sure it would need to prevent one-boxing either. Presumably it already puts the whole link in if they don’t add the optional title. Isn’t that how a one-box is created anyway?

4 Likes

Oh that’s very a pinteresting idea. I like that.

6 Likes