The SharePoint Content Editor Web Part

By:   |   Comments   |   Related: > Sharepoint Design


SharePoint lists and libraries are great. I love all of the dynamic/collaborative content possibilities, but once in a while I'd like a good looking web page with some static content to welcome users and introduce the purpose of a site page.


The Content Editor Web Part is a great interface to add formatted text, tables and graphics to a SharePoint page. There are plenty of options for adding content. The built-in "rich text editor" is powerful, yet simple enough for most needs. Or if you prefer, you can code your own html directly with the "Source Editor". You can even start with the rich text editor and tweak things with the source editor.

Another alternative is to use some external source to feed content to one or more of these Content Web Parts simultaneously.. That way you can sprinkle a message or other content all over your SharePoint site and have a single source to edit. (Nifty!)

Let's review some specifics.

Adding the Content Editor Web Part to a page.

To add content to a page, click "Site Actions", and then "Edit Page".

1 EditPage

Then on one of the web parts, click the "Add a Web Part:" link.

2 Add a Web Part

Scroll down the web part list until you see "Content Editor Web Part" under the "Miscellaneous" section. Check the box and click "Add".

3 Add Content Web Part

Click the "Edit" dropdown and select "Modify Shared Web Part".

4 Modify Shared Web Part

Now you will see the Content Editor Web Part panel. The three options for adding content are numbered below. For #3 to work, some text-based content must already pre-exist in another commonly accessible location (probably in your SharePoint environment, but not necessarily). For #1 and #2, you can begin adding content on the fly.

5 CEWP panel

The "Rich Text Editor" offers many tools. You can add hyperlinks to your text by using the link button on the toolbar. The "Edit Hyperlink Properties" dialog offers options for:

  • Opening the link in a new window.
  • Displaying a document graphic.
  • Adding a "Tooltip".
  • Creating a "Bookmark".
5 Hyperlink

The Rich Text Editor also offers the ability to add graphics. The trick here is that the graphic must pre-exist in a commonly accessible location. Try uploading your graphic to a new document library. (I created a library called "webdocs" for this purpose and set permissions to 'read only' for most users.)

To demystify the URL below (#2):

  • jazz-moss07: Name of server, also the root of the site collection
  • builtinwebparts: a subsite built for this demonstration, built one level below the root of the site collection.
  • webdocs: Document Library (for storing miscellaneous web content)
  • CEWP: a folder within the webdocs library
  • EditPage.jpg: the file used to show how graphics display in the Content Editor Web Part.
6 AddGraphic

The toolbar in the Rich Text Editor shows that there are many built-in options for formatting, adding graphics, links and tables, etc.

7 Toolbar

This is the "Source Editor" option. Since I already started this web part with the Rich Text Editor, it shows the content previously created, then converted to native html format. Here you can tweak the code, or simply start from scratch if you prefer to write your own html. (Note: All code gets stripped of any extra spaces, so don't bother to format your html into nice readable lines. It all gets converted back to spaghetti code when you are done.

8 SourceEditor

The "Content Link" option allows you to point to some externally existing text file, which can be displayed. The text file can also be html. This provides an advantage of centralizing the source, while being able to roll out the content in multiple places (i.e. important announcements or news).

9 sometext

Here's what my whole page looks like:

0 whole page

The Content Editor Web Part is a simple, yet flexible web part that allows for rich content to be displayed. Use it on your splash pages to give users direction or simple instructions about other content.

Next Steps
  • Explore the other options in the Content Editor Web Part.
  • Check out these other Sharepoint Tips.

sql server categories

sql server webinars

subscribe to mssqltips

sql server tutorials

sql server white papers

next tip

About the author
MSSQLTips author Rob Fisch Rob Fisch has worked with SQL Server since version 6.5 as a dba, developer, report writer and data warehouse designer.

This author pledges the content of this article is based on professional experience and not AI generated.

View all my tips

Comments For This Article

get free sql tips
agree to terms