Suggestion - link to existing content faster from the url button

(Nordize) #1

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?

(Jay Pfaffman) #2

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.

(Rafael dos Santos Silva) #3

At How about 'mentioning topic' feature? we discuss this power user feature, where you can press CTRL+ALT+F while composing a post, type your search, select the match with :arrow_up: or :arrow_down: and then press A to insert it on the composer.

I created the link above using it.

(Jay Pfaffman) #4

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

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

(Rafael dos Santos Silva) #5

If you scroll down there you get to

(Jay Pfaffman) #6

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:

(Rafael dos Santos Silva) #7

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.

Searching an external site possible?
(Jay Pfaffman) #8

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:

(Nordize) #9

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?

(Daniel Hollas) #10

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.

(Stephen) #11

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.

(Sam Saffron) #13

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

(Daniel Hollas) #14

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

(Nordize) #17

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.

(Jeff Atwood) #18

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.

(Nordize) #19

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.

(Stephen) #20

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.


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?

(Jeff Atwood) #22

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