Pulling in content with a Content Editor Web Part
By Ryan Keller
May 29, 2012 —
(Page 1 of 2)
We all know how useful the Content Editor Web Part (CEWP) can be. It is often called the Swiss Army Knife of SharePoint Web Parts: You can use it to add text, images, scripts and styles to a page, and even display content from external files. It’s this last point that we’ll be diving into in this article.
One way the CEWP can be used is by entering HTML or scripts into the HTML source. In SharePoint 2010, click inside the CEWP, and in the Format Text ribbon, click the HTML dropdown and select Edit HTML Source. Here, you can paste your HTML or script into the CEWP source and call it a day. Note that not all kinds of scripts will work properly when using this method.
An alternative to pasting a script or HTML into the CEWP’s HTML editor is pointing the Web Part to an external TXT or HTML file stored in a document library and have it display the contents of that file on your page. One benefit of this is method of displaying content is that you don’t have to edit the SharePoint page in order to change the content of the CEWP. Even better, if you use this same content on multiple pages, you only need to edit the source file to make the change to more than one page.
Let’s take this concept one step further and look at adding a CEWP to a page layout or master page. In SharePoint Designer, you can open a custom page layout or master page and simply drop a CEWP right into the page. More specifically, with the page layout or master page open, you would position your cursor where you want the CEWP to go (either in the code view or designer view), click the Insert tab in the Ribbon, click the Web Part dropdown, and finally select Content Editor from the list. This will drop code for the CEWP right into your page layout or master page.
Share this link:
Managing permissions in the Content Organizer (Third of three parts)
In this chapter, we cover ways to configure the Content Organizer’s ability to manage permissions
More on the Content Organizer in SharePoint (Second of three parts)
Content Organizer can partition libraries based on their size
EMC Puts Content on Center Stage
EMC has announced version 6.5 of its Documentum Enterprise Content Management Suite, adding to it products like the CenterStage Essentials client and the Media WorkSpace rich media interface.
This site's content Copyright © 1999 - 2013 by BZ Media LLC, All rights reserved.
Legal and Privacy
Phone: +1 (631) 421-4158 • E-mail: