cancel
Showing results for 
Search instead for 
Did you mean: 
sdavick
Community Member

Help with Rich Content Editor stripping code

Jump to solution

Something new has been happening when I try to embed a video. Always before I was able to simply copy the html code and paste it into the html editor. When I returned to the rich content editor I could continue adding content to my assignment without a problem.

Lately, when I embed a video the code that tells the size I'd like iframe to be is stripped and it shows up as a very small embedded video in the assignment.

I have found that if I paste the code in the html editor and then save the assignment without returning to the rich content editor the sizing will stick. The problem is that if I return to the assignment to make any kind of changes as soon as I open the editor the code is stripped. If I want to keep the sizing I can not return to make any changes.

Any suggestions as to why this is happening now when it wasn't before?

This is the html I am pasting: <iframe width="853" height="480" src="https://www.youtube-nocookie.com/embed/dAgfnK528RA?rel=0" frameborder="0" allowfullscreen></iframe>

This is what it looks like when the editor strips it: <iframe src="https://www.youtube-nocookie.com/embed/dAgfnK528RA?rel=0" allowfullscreen="allowfullscreen"></iframe>

The video shows up like this:

239568_genie2_tray 6232017 111826 PM.bmp

Here is what I'd like it to look like:

239569_genie2_tray 6232017 113248 PM.bmp

Edited to add:

I just discovered the ALT + F9 option that opens the hidden menu allowing another way to insert embedded video from the rich content editor without using the html editor. Using this method also results in stripping the size of the video.

1 Solution

Accepted Solutions
James
Navigator

 @sdavick ,

This sounds you're having the same problem experienced by other people.

There was a discussion here iframe issues (reverts to 300x150) , where the recommendation was to specify the size using the style attribute instead of the height and width separately: style="height: 480px; width: 853px;"

There's some discussion about this issue in the https://community.canvaslms.com/docs/DOC-11158-canvas-production-release-notes-2017-06-03 

There's also a blog post that provides an another suggestion: Embedding a YouTube Player with Responsive Aspect Ratio 

View solution in original post

4 Replies
James
Navigator

 @sdavick ,

This sounds you're having the same problem experienced by other people.

There was a discussion here iframe issues (reverts to 300x150) , where the recommendation was to specify the size using the style attribute instead of the height and width separately: style="height: 480px; width: 853px;"

There's some discussion about this issue in the https://community.canvaslms.com/docs/DOC-11158-canvas-production-release-notes-2017-06-03 

There's also a blog post that provides an another suggestion: Embedding a YouTube Player with Responsive Aspect Ratio 

View solution in original post

Oh, that solved my problem. It has been so frustrating... thanks. 

snugent
Lamplighter II

This has been happening to me for some time now. I have a ticket on this to Canvas support so they are aware it is an issue. I have found that this only happens when I add a link using the link option in the rich content editor. My work around is select the text I want for a link. Then use the keyboard shortcut CTRL (CMD) + K. This will bring a better link dialog box and it doesn't change your video dimensions.

sdavick
Community Member

I am very glad to say this issue seems to have been corrected. I am now able to paste the iframe code just as it is and it will maintain the size.