How to insert a link to Youtube video, with preview image shown

Years later, something happened, and no images were appearing. Posters found a workaround, adding &1, &2, etc. It worked for me. Although I sometimes I had to add a higher number than 1 or 2, so I would default automatically to &7.

Then something else happened, Discourse maybe, and that way wasn’t working. One poster suggested the way that worked for me that I had been using since.

Type reply to post, when finished, highlight the https part and ctrl c. They used to be much shorter without all this extra stuff at the end. Lastly, as soon as you hit the ctrl v, you hit the reply button. It had always worked until now.

I found something interesting- if a do manage to insert a YT vid, but later i want to edit it- it wont let me, with the usual warning about inserting stuff like that- even if the edit has nothing to do with the YT vid.

So if you do manage to insert a video, dont edit the post.

I will still have to hide the preview pane and type the &1, &2, etc.?

I have the pane hidden for now.

Thank you, I learned that one long ago. It’s the getting the image to show up the first time, that I’m having trouble with.

Yes, you are working around two separate and unrelated problems: 1) ctrl-V pastes it as a formatted hyperlink, not plain text, and 2) Discourse can’t show the same preview twice, so you need to use shenanigans to make each link unique.

Correct, once it has shown the preview, it can’t again. When you edit the post, it counts as a second “showing” and fails. You can still edit the post, you just need to change the suffix, for example from &1 to &2.

Where is paste as plain text?

I’m going to provide a step by step list based on the above, but with additions that I use for YouTube previews. So far it works 100% of the time. I only do this on my computer and make no assertions on how it will work for phone or tablet.

  1. Type in the text of your post. Proof read it and make sure it is what you want, because of “however” sentence in the above paragraph.

If you plan on inserting more than one link, my recommendation is to open a text editor (I use Word, because a lot of the formatting in Word transfers seamlessly to Discourse) and type the text in that.

  1. In a separate browser tab, find the video you want to insert, and copy the URL for that video. (This can be done at any time before step 4.).

I only use the “Share” button for the URL (a box pops up and you hit the “Copy” button in the box to add it to the clip board). I’m not sure this is necessary, but as someone pointed out, if you copy the URL from the address bar, it might be a pointer to the actual URL of the video if you are copying from a page playing a list of videos.

I then paste the URL into a text editor (see above), and add &NN (where NN is a semi-random two digit number) to the end of the URL. This is because if the preview has previously been posted to the Board, you will get an error that you can’t post, but adding the &NN makes the preview unique as far as the board is concerned.

  1. Go back to your post, and place your text cursor where you want the video to appear. There should be nothing else on that line. Place your usual mousing hand on your mouse, and place the hand cursor over the Reply button.

At this point, I copy everything in the text editor and then follow the guidance above and below.

  1. Once your cursor is in place, use your non-mousing hand to press Ctrl V to paste the URL into that position.

  2. Immediately click the Reply button, which saves the post. I don’t know how much time you have, I try to do it within a second, which is why I have my hand on my mouse and the cursor positioned over the Reply button before doing step 4. This short time is crucial to preventing the software from thinking about what it’s doing (this is what I tell myself) before “setting” the preview.

  3. Back away from the keyboard and let well enough alone (i.e. don’t try to make any changes to the post).

Thanks for the additional completions to the list of steps, very useful. I don’t do any of those extra things myself, only because I’m not any more ambitious than to insert one link, and I’m afraid I’m unclear on the issue between sharing and copying the URL.

Thank you TroutMan,peccavi, and all. I will be back to try again later.

Here’s the right-click menu for me in Edge browser with Windows. The exact menu will depend on your browser and OS.

And if you’re on a Windows machine, shift-ctrl-V will work too.

^Thank you once again TroutMan! I’m not quite sure how I did that wish I had written it down. I will next time though. I didn’t have to do any &1 or &2 or &7

You only need to do that if a preview for a particular video has already occurred on this board. In that case, the link is “tainted” and you get a warning if you try to post it. So you need to subtly change it.

If that hasn’t happened yet, then there’s no need for those shenanigans and you can just post a normal link to the video.

Loved this the first time I heard it.

Thank you Troutman! I wrote it down.

Thank you Atamasama! No, I haven’t had to add the extra stuff.

That’s awesome. :smiley:

I really appreciate all the help.

Or set the timestamp to 0 (&t=0, add more 0 if needed).

I add #1, #2, and so on to the end if needed. It’s just easier for me to remember.

Test
testtest