cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bbennett2
Community Champion

Disable YouTube inline preview by default

Jump to solution

I post a lot of videos inline as links. Normally, I hit Ctrl + K to quickly drop a link into the text so it's in context. Videos I require students to watch get embedded somewhere else on my site. I'm wondering if there is a way to disable the inline preview by default so I don't have to use the insert link menu item.

I know it's not a big deal, but when you take time to link a  lot of videos, it adds up 🙂

1 Solution

Accepted Solutions
kblack
Community Champion

Hi  @bbennett2  - I admit I didn't know about that Ctrl-K shortcut, so thanks for that tip, but your question made me think that I saw something about this in the past.  Sure enough, Community font of wisdom stefaniesanders posted a solution to this issue on a previous post here:  https://community.canvaslms.com/message/19648  I just tried it myself, and it's still working.  As Stefanie mentions, you will likely want go to the HTML editor to change the default wording of "Link" that appears, but indeed there is no inline video if you follow her steps.

View solution in original post

3 Replies
kblack
Community Champion

Hi  @bbennett2  - I admit I didn't know about that Ctrl-K shortcut, so thanks for that tip, but your question made me think that I saw something about this in the past.  Sure enough, Community font of wisdom stefaniesanders posted a solution to this issue on a previous post here:  https://community.canvaslms.com/message/19648  I just tried it myself, and it's still working.  As Stefanie mentions, you will likely want go to the HTML editor to change the default wording of "Link" that appears, but indeed there is no inline video if you follow her steps.

View solution in original post

dhaworth
Instructure
Instructure

You can disable the inline preview by editing the HTML <a> tag to have 

class="inline_disabled" 

So if you have several YouTube links on a page, for example:

<a href="https://www.youtube.com/001">Video link #1</a>

<a href="https://www.youtube.com/002">Video link #2</a>

<a href="https://www.youtube.com/003">Video link #3</a>

Open a text editor and paste the HTML. I prefer text editors such as Atom (http://atom.io/) or Sublime Text (https://www.sublimetext.com/), but even the default, built-in text editors for Mac or Windows will work. Activate the Find and Replace command and do something like this:

Find:

<a href="https://www.youtube

Replace with:

<a class="inline_disabled" href="https://www.youtube

and you end up with

<a class="inline_disabled" href="https://www.youtube.com/001">Video link #1</a>

<a class="inline_disabled" href="https://www.youtube.com/002">Video link #2</a>

<a class="inline_disabled" href="https://www.youtube.com/003">Video link #3</a>

Voila! No previews. It's really handy for saving time and clicks :smileycool:

Hello https://community.canvaslms.com/t5/user/viewprofilepage/user-id/226305 

I am actually having the the opposite problem. That is, I would like the video previews to display inline. These previews used to display automatically. Now, by default, whenever I use the Link > External Link option to add a video, I have to go into the HTML code and delete the "instructure_file_link inline_disabled" text for that video preview to display. I realize I could use the "embed" option, but those video previews are quite large, and the embed option does not appear to permit resizing. 

Is there some way to just change my default, such that the video preview is enabled. so that preview will display automatically and I won't have to edit the html code every time I add a video link?