Jan 4, 2013

Script Editor Web Part in SharePoint 2013

One of the cool new things in SharePoint 2013 is the Script Editor WebPart that enables adding script snippets to any page (also the formerly out-of-the-loop Foundation based sites). This Web Part is very simple to use:
  1. add it to the page from (Insert Ribbon tab > Web Part) Media and Content category
  2. open the Web Part Properties (e.g. from Webpart tab in the Ribbon when Web Part is selected)
  3. an Edit Snippet link appears in the right bottom corner of the Web Part, click it
  4. insert your JavaScript snippet in the Embed dialog
You can use Content Editor Web Part to add custom HTML and CSS to the page, or add content straight to the HTML source of a Foundation site, and use the script in the Script Editor Web Part to control the behavior of these - or any other elements on the page, including other Web Parts.

No comments: