Text, rich text and HTML elements
You use text, rich text and HTML elements to store blocks of text,
but each has slightly different properties.
Creating an element
Text, rich text and HTML elements
can be added to sites, site areas, content items and authoring templates or
they can be created as individual components.
Text element
You use a text element to store text
or HTML as an element. No special processing occurs for this element. This
is useful if you have a piece of text or HTML that is used in more than one
area of your site. You can store a text element in an authoring template,
site, site area, content item or text component.
Short text element
A short text element is similar
to the text element but with the following differences:
- it can only store a maximum 250 bytes of text.
- it can be used as a search parameter in a Personalization rule.
Rich text element
A rich text element is the same
as a text element except that it includes a rich text editor that can be used
to format text stored within a rich text element. The main purpose of the
rich text element is provide base-level content creators with an easy-to-use
text editor. Advanced users who are required to produce more advanced code,
including Web content tags, should use an HTML element instead.
You
access the accessibility features of the rich text editor by typing control-shift-m.
This launches the detached accessible toolbar. You then use the following
keystrokes:
- Control-shift-t
- This launches the table insertion dialog. Users should first select the
point at which to create the table in the edit window, and then launch the
table insertion dialog. You use the tab button to navigate through the data
entry fields that are used to define the table. Users may click the OK button
to insert the table or click the Cancel button to cancel the action.
- Control-shift-g
- This launches the color picker dialog. Users should first select some
text in the edit window, and then launch the color picker. Users can use the
tab key to navigate through the color swatches. The selected color name and
value are displayed in the top text area. Users may press the Enter key
to apply the color to the selected text or press the Cancel button
to cancel the action.
The detached accessible toolbar can be closed by using the alt-F4 keystroke.
You
can customize the detached accessible toolbar keystrokes by editing the KeySequence.properties file
located under the ..\PortalServer\shared\app\com\ibm\wps\odc\editors folder.
HTML element
An HTML element is similar to the rich
text element but does not include a rich text editor. You can enter HTML directly
into the element or upload HTML from a previously created HTML file. An HTML
element is stored in an authoring template, site, site area, content item
or HTML component.
Using Web content tags in rich text and HTML elements
Text elements
|
Web content tags cannot be used in text elements.
|
HTML elements
|
Any combination of Web content tags
can be used in HTML elements with the following exceptions:
- You cannot use single quotes around attribute values.
- <Component name='example'/>
- <Component name='example' start='<a href="' end=' ">link</a>'/>
- <Component name='example' start='<img src="' end=' "/>'/>
- You cannot use double quotes inside attribute values.
- <Component name="example" start="<a href="" end="">link</a>"/>
- <Component name="example" start="<img src="" end=""/>"/>
|
Rich text elements
| Basic Web Content Management tags can be used in
rich text elements. For example, the following tags can be used in Rich Text
elements:
- <component name="test"/>
- <element type="content" context="current" key="body"/>
Note: Highlighting of rich text elements is not enabled by default.
To enable this support, ensure that your server administrator adds the following
line to the WCMConfigService.properties file: wcm.enableWCMTagHighlighting=true
The following tag formats are invalid:
- The use of single quotes around attribute values.
- <Component name='example'/>
- <Component name='example' start='<a href="' end=' ">link</a>'/>
- <Component name='example' start='<img src="' end=' "/>'/>
- The use of double quotes inside attribute values.
- <Component name="example" start="<a href="" end="">link</a>"/>
- <Component name="example" start="<img src="" end=""/>"/>
- Embedding tags inside other HTML tags.
- <a href='<Component name="example"/>'>link</a>
- <img src='<Component name="example"/>'/>
|
Parent topic: Storing text and HTML
Related concepts
Displaying item details
Referencing elements
Related tasks
Creating components
Adding elements to an item
Inserting an image in an element
Inserting a link in an element
Importing and exporting HTML
Displaying item details
Referencing elements
|
|
|