Using the Content Editor Web Part - DOTNET

Using the Content Editor Web Part


You can use the Content Editor Web Part to add formatted text, tables, hyperlinks, and images to a Web page.
 IMPORTANT   The Content Editor Web Part is intended for adding content to a page, which may include hyperlinks. However, this Web Part is not designed to connect to a Web site. If you need to connect a Web Part to a Web site, consider using the Page Viewer Web Part.
In this article

Ways you can use the Content Editor Web Part

You can use the Content Editor Web Part to add:
  • An introductory, formatted paragraph to a page.
  • A table of instructions to explain a chart on your page, the data that is used in the chart, and how the chart was created.
  • A set of hyperlinks to more information.

Add a Web Part to a page

To edit a page you must have at least the permissions obtained by being added to the default <Site Name>Members SharePoint group for the site.
  1. From a page, in the ribbon, click the Page tab, and then click the Edit command.
Image: Edit command of the Edit tab
 NOTE    If the Edit command is disabled, you may not have the permissions to edit the page. Contact your administrator.
  1. Click on the page where you want to add a Web Part, click the Insert tab, and then click Web Part.
Web Part command
  1. Under Categories, select a category, such as Lists and Libraries, select the Web Part that you want to add to the page, such as Announcements, and then click Add.
Web Part picker
  1. When you select a Web Part, information about the Web Part is displayed in About the Web Part.
  2. When you have finished editing the page, click the Page tab, and then click Save & Close.
 NOTE    The Content Editor Web Part is in the Media and Content Category.

Add content to the Content Editor Web Part

There are two ways you can add content to the Content Editor Web Part. You can:
  • Type content directly into the Web Part    To do this, point to the Content Editor Web Part, click the down arrow, and then click Edit Web Part. Once you are in Edit mode, you can type text directly into the Content Editor Web Part.
  • Link to existing content by entering a hyperlink to a text file that contains HTML source code    To do this, point to the Content Editor Web Part, click the down arrow, and then click Edit Web Part. In the tool pane, type the URL in the Content Link text box. The two valid hyperlink protocols that you can use are:
  • Hypertext Transfer Protocol (http://)
  • Hypertext Transfer Protocol with privacy, which uses Secure Sockets Layer (SSL) encryption (https://)
You can use an absolute URL or a relative URL. However, you cannot use a file path.
 NOTE    If you enter a URL into the Content Editor Web Part as a relative link, the link converts to an absolute URL when the entry is saved. This automatic conversion can be an issue if you are deploying content from a staging environment to production, where absolute URLs reference the original server's name. To address this automatic conversion issue, you will need to edit the Content Editor Web Part on the production server and update the URLs manually.
 IMPORTANT    If the Content Link property links to a file that is located outside the site and the site does not have anonymous user access enabled, you cannot access the file. For assistance, contact your site administrator.

Combine edited and linked content

You can combine edited and linked content to provide both primary and secondary information. For example, you can provide an error message as secondary information in the edited content, in case the linked content or primary information is not available. When you combine both edited and linked content, the linked content is always used first. If the linked content is not accessible, the edited content is used.

Format content in the Content Editor Web Part

In Microsoft SharePoint Foundation 2010, you can type content directly into the Content Editor Web Part and format it using the editing tools available from the ribbon. To access these editing tools, from the Page tab, in the ribbon, click Edit.
The ribbon includes six groups of formatting options which are described in the table that follows.
GROUPDESCRIPTION
FontUse these tools to format selected text in the Web Part. You can modify the font type, size, and color, make text bold or italicized, highlight selected text, and strike through it, among other things.
ParagraphUse these tools to format selected paragraphs in the Web Part. You can modify the alignment of the text, indent it, create a numbered or bulleted list, and change the order in which information in the paragraph is displayed.
StylesApply a preformatted style to selected text. To preview a style, select the text you want to format, and then drag your cursor over the style option you want to preview.
SpellingCheck the spelling of text on the page. This option is available only when the spell checking feature is installed.
LayoutCreate or remove columns, headers, or footers on the page.
 NOTE    This option affects the entire page, not just the content in the Content Editor Web Part.
MarkupUse these tools to insert specific HTML elements into the content. You can select a preformatted style from the Markup Styles drop-down menu, or create your own by accessing the HTML Editor from the HTML drop-down menu. You can also mark text as being in a specific language.

Configure the common properties of a Web Part

Web parts share a common set of properties that control their appearance, layout, and advanced characteristics. You change Web Part properties in the tool pane.
 NOTE    the common Web Part properties that you see in the tool pane may be different from what is documented in this section for several reasons
.
  • To see the Advanced section in the tool pane, you must have appropriate permission.
  • For a specific Web Part, a Web Part developer may have chosen not to display one or more of these common properties or may have chosen to create and display additional properties that are not listed below in theAppearanceLayout, and Advanced sections of the tool pane.
  • Some permission and property settings may disable or hide Web Part properties.

Appearance

PROPERTYDESCRIPTION
TitleSpecifies the title of the Web Part that appears in the Web Part title bar.
HeightSpecifies the height of the Web Part.
WidthSpecifies the width of the Web Part.
Chrome StateSpecifies whether the entire Web Part appears on the page when a user opens the page. By default, the chrome state is set to Normal and the entire Web Part appears. Only the title bar appears when the state is set to Minimized.
Chrome TypeSpecifies whether the title bar and border of the Web Part frame are displayed.

Layout

PROPERTYDESCRIPTION
Hidden
Specifies whether the Web Part is visible when a user opens the page. If the check box is selected, the Web Part is visible only when you are designing the page and has the suffix (Hidden)appended to the title.
You can hide a Web Part if you want to use it to provide data to another Web Part through a Web Part connection, but you do not want to display the Web Part.
DirectionSpecifies the direction of the text in the Web Part content. For example, Arabic is a right-to-left language; English and most other European languages are left-to-right languages. This setting may not be available for all types of Web Parts.
Zone
Specifies the zone on the page where the Web Part is located.
 NOTE    Zones on the page are not listed in the list box when you do not have permission to modify the zone.
Zone Index
Specifies the position of the Web Part in a zone when the zone contains more than one Web Part.
To specify the order, type a positive integer in the text box.
If the Web Parts in the zone are ordered from top to bottom, a value of 1 means that the Web Part appears at the top of the zone. If the Web Parts in the zone are ordered from left to right, a value of 1 means that the Web Part appears on the left of the zone.
For example, when you add a Web Part to an empty zone that is ordered from top to bottom, the Zone Index is 0. When you add a second Web Part to the bottom of the zone, its Zone Index is 1. To move the second Web Part to the top of the zone, type 0, and then type 1 for the first Web Part.
 NOTE    Each Web Part in the zone must have a unique Zone Index value. Therefore, changing the Zone Index value for the current Web Part can also change the Zone Index value for other Web Parts in the zone.

Advanced


PROPERTYDESCRIPTION
Allow MinimizeSpecifies whether the Web Part can be minimized.
Allow CloseSpecifies whether the Web Part can be removed from the page.
Allow HideSpecifies whether the Web Part can be hidden.
Allow Zone ChangeSpecifies whether the Web Part can be moved to a different zone.
Allow ConnectionsSpecifies whether the Web Part can participate in connections with other Web Parts.
Allow Editing in Personal ViewSpecifies whether the Web Part properties can be modified in a personal view.
Export ModeSpecifies the level of data that is permitted to be exported for this Web Part. Depending on your configuration, this setting may not be available.
Title URLSpecifies the URL of a file containing additional information about the Web Part. The file is displayed in a separate browser window when you click the Web Part title.
DescriptionSpecifies the ScreenTip that appears when you rest the mouse pointer on the Web Part title or Web Part icon. The value of this property is used when you search for Web Parts by using theSearch command on the Find Web Parts menu of the tool pane.
Help URLSpecifies the location of a file containing Help information about the Web Part. The Help information is displayed in a separate browser window when you click the Help command on the Web Part menu.
Help Mode
Specifies how a browser will display Help content for a Web Part.
Select one of the following:
Modal    Opens a separate browser window, if the browser has this capability. A user must close the window before returning to the Web page.
Modeless    Opens a separate browser window, if the browser has this capability. A user does not have to close the window before returning to the Web page. This is the default value.
Navigate    Opens the Web page in the current browser window.
 NOTE    Even though custom Microsoft ASP.NET Web Parts support this property, default SharePoint Help topics open only in a separate browser window.
Catalog Icon Image URLSpecifies the location of a file containing an image to be used as the Web Part icon in the Web Part List. The image size must be 16 by 16 pixels.
Title Icon Image URLSpecifies the location of a file containing an image to be used in the Web Part title bar. The image size must be 16 by 16 pixels.
Import Error MessageSpecifies a message that appears if there is a problem importing the Web Part.
Copyright © 2015 DOTNET All Right Reserved