How do I stop a Youtube video from embedding?


(Jeffrey L Frusha) #1

Checked in test messages here, as well as at seasteading.org, in both Firefox and Chrome. I don’t know if this is a Discourse bug, or a Chrome bug (since that’s where I get the option).

In Chrome, I get the option, when I right-click to paste a link, to “Paste as plain text” but it won’t do it. I have to manually remove the ‘https//’ to post a video url, without it going to the video player.

In Firefox, I don’t even get the option in the pull up menu. As a ‘user’, I am only reporting something I’ve found. It may not even be a Discourse issue.

Posting this message is via Chrome.

Example: (right-click, selected “Paste as plain text”

“Paste as plain text”…

//youtu.be/p_UXnyP-8lA (manually retracted)

Simply pasted link


(Tom Newsom) #2

“Paste as plain text” only strips the formatting as text goes from Clipboard -> Destination. Given that the discourse editor window is a plaintext-only box, the command is no different from an ordinary Paste.

From Discourse’s point of view, you typed the URL of a youtube video, so that’s how it treats it.

If you want to force “raw” display of text, enclose it with ` characters (that’s the top left key on your keyboard)

Like so: http://youtu.be/p_UXnyP-8lA


(Jeffrey L Frusha) #3

That’s what the edited “Paste as plain text” looks like, except fewer back-slashes, which is why I showed my manually retracted, removing the ‘https://’ if it’s a “plain text” it should be stripped of the hot-link(?) and just show the web-address as a sequence of symbols (letters, punctuation, and numbers). It should show what I see in the address bar, rather than the video-player. That’s my understanding of the difference between a link as plain text and a link that displays the video player. If I’m wrong, that’s fine, and I’m learning. I just wanted to be sure, because I have a friend that almost always asks for the web-address, instead of the hot-linked video player, which is why I’ve even tried the ‘Paste as plain text’ option. In case it was a bug in Discourse, I wanted to report it.


(Tom Newsom) #4

There is no bug. The default behaviour in Discourse is for a youtube URL to be automatically converted to an embedded video. To create a hyperlink, type some text, highlight it and then click the link button

This is a link

“Paste as plain text” is irrelevant, because the Discourse editor is not WYSIWYG - it’s all plaintext by default. Formatting is added by special sequences of characters, or automatically when certain types of link are detected.


(cpradio) #5

You can put a space in front of the URL to make it not embed it though.

 https://www.youtube.com/watch?v=p_UXnyP-8lA

which shows as
Zentech Semi-Submersible Jackup Drilling Rig for Polar Waters


(Tom Newsom) #6

That’s a neat trick :slight_smile: Thanks!


(Jeffrey L Frusha) #7

Thank you! I’m learning. Just thought it appeared to be a problem.

Thank you for that! One thing I say, “When you quit learning, you start dying.”