The Content Editor Web Part (CEWP) allows you to add text, html, scripts or styles to a SharePoint page. Its versatility makes it a favorite among Web designers.
The fpweb.net site offers a tutorial on how to add a CEWP to a page:
http://www.fpweb.net/sharepoint-tutorials/ContentEditorWebPart.asp
http://www.fpweb.net/sharepoint-tutorials/ContentEditorWebPart.asp
The CEWP has two edit options:
- Rich Text Editor: as it says, allows you to add formatted text.
- Source Editor: this is a more powerful option, allowing you to add html, scripts or styles.
- Rich Text Editor: as it says, allows you to add formatted text.
- Source Editor: this is a more powerful option, allowing you to add html, scripts or styles.
Note that the CEWP is not the only Web Part to allow you to add html to your pages. In some cases you may also consider the Form Web Part or the Page Viewer Web Part.
Looking for examples?
You’ll find on the Web many examples of how to use the CEWP. There’s even a whole site dedicated to it:
http://www.contenteditorwebpart.com/default.aspx
http://www.contenteditorwebpart.com/default.aspx
Many scripts were introduced for SharePoint 2003, usually they’ll also work in SharePoint 2007 (after all, they just use JavaScript). This is not the case for styles, as some ids and class names have changed from SharePoint 2003 to SharePoint 2007.
If you add scripts or styles, you’ll usually choose to hide the CEWP (check the “Hidden” box under Layout).
I came across a good video sample on youtube which adds a slideshow on SharePoint site using Javascript and Content Editor Web Part.
No comments:
Post a Comment