By: Rob Fisch | Updated: 2010-01-26 | Comments | Sharepoint
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".
Then on one of the web parts, click the "Add a Web Part:" link.
Scroll down the web part list until you see "Content Editor Web Part" under the "Miscellaneous" section. Check the box and click "Add".
Click the "Edit" dropdown and select "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.
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".
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.
The toolbar in the Rich Text Editor shows that there are many built-in options for formatting, adding graphics, links and tables, etc.
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.
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).
Here's what my whole page looks like:
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.
- Explore the other options in the Content Editor Web Part.
- Check out these other Sharepoint Tips.
Last Updated: 2010-01-26
About the author
View all my tips