SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a SharePoint 2010 publishing site. I need to embed YouTube videos inside the page content of some pages. After inserting the HTML in the HTML Edit mode, I find that SharePoint removed the YouTube code from the HTML source.

Is there a way to get around this problem?

share|improve this question
How does your code look like? Please give of some input :) – Smokefoot Feb 21 '12 at 22:02
up vote 2 down vote accepted

SharePoint likes to keep code safe and when adding embedded code, therefore it removes the Youtube embedded code from the Page. Hopefully, this link will help you getting across the problem

share|improve this answer
haha that was the same ressource I thought about :D – Smokefoot Feb 21 '12 at 22:25

If you're trying to do this on SharePoint 2013, there's an "Embed Code" option in the Ribbon. To add a Youtube video, go to Youtube and view the "Share this video" and click on "Embed" which will give you the iframe code to add to the SharePoint snippet. It would look something like this

<iframe width="560" height="315" src="//" frameborder="0" allowfullscreen></iframe>
share|improve this answer

For 2010 use an HTML Form web part. Add it, edit the web part, click on the Source Editor button, delete the sample form code and paste in your embed code.

The other way to do it on 2010, is to paste your code into a text file, upload the text file to your site, add a content editor web part, edit the web part and then paste the link to your text file into the Content Link box.

share|improve this answer

This post gives an explanation on how to embed YouTube videos inside the page content with Content Editor web part using embed tag

<embed src="http://link to video goes here"

Also, I recommend to take a look on the different approach as described here and here

The main idea to store embed code in Custom List and not in Page Content enter image description here enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.