Insert JavaScript or Embed a Video into SharePoint 2013


SharePoint 2013

In SharePoint 2007 and SharePoint 2010, we had the Content Editor web part as a work around to add JavaScript, CSS, or another markup into SharePoint. SharePoint 2013 has given us the Script Editor. Let’s take a look at how effortlessly we can add our code to SharePoint.

I’m starting with a Team Site template and I’m going to use the “Edit” icon in the top right to put the page in edit mode.

Select “Page” from the ribbon and choose “Insert” then “Web Part”.

Select the Script Editor web part under “Media and Content”.

Edit the web part on the page and you’ll notice the “Edit Snippet” in the contents of the Script Editor web part.

Select “Edit Snippet” and we are presented with a dialog box to enter our embed code. I chose a random video from YouTube. J

You can, of course, insert JavaScript into the Embed box. This is a simple today’s date script. It does not give you a preview of your code though like the embed video from YouTube.

Click “Insert” then “Ok” on the web part properties. Save and Close your edits using the link in the top right. I like how the web part defaults with no chrome (no Title). All done!


About these ads


Subscribe to our RSS feed and social profiles to receive updates.

3 Comments on “Insert JavaScript or Embed a Video into SharePoint 2013”

  1. Adam Harmetz Says:

    Fellow SharePoint Adam here. =)

    Happened to stumble upon your post here and figured I’d mention that it gets even better! Take a YouTube embed code and paste it directly onto the page and see what happens. No need to even click the Embed button!

    -Adam Harmetz
    Lead Program Manager, SharePoint ECM Team
    (twitter: AdamHarmetz)


  2. Anatoly Mironov Says:

    Reblogged this on Share… What? and commented:
    New features for sharepoint editors: embed js code or video. Nice intro.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 43 other followers

%d bloggers like this: