+

Search Tips   |   Advanced Search

Text, rich text and HTML elements

Use the short text, text, rich text and HTML elements to store blocks of text, but each has slightly different properties.


Create an element

Short text, text, rich text and HTML elements can be added to site areas, content items and authoring templates, or they can be created as individual components.

    Short text element A short text element is used to store small amounts of fixed-length text where the length is 250 bytes or less. Unlike the other text elements, short text elements can also be used as a search parameter in a Personalization rule.
    Text element Store larger amounts of text than can be stored in a short text element. No special processing occurs for this element.
    HTML element Used to store fragments of HTML that can be reused in presentation templates and other elements designs. We can enter HTML directly into the element or upload HTML from a previously created HTML file.
    Rich text element Similar to the HTML element except that it includes a rich text editor 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, or who need to store fragments of HTML should use an HTML element instead. We should use rich text elements sparingly in authoring templates, site areas and content items as adding multiple rich text elements to these items can reduce authoring performance. The rich text editors used by Web Content Manager are supplied by other vendors. For information on using the rich text editor, see the user documentation supplied by the specific rich text editor vendor.


Use web content tags in rich text and HTML elements

Element type Details
Short Text and Text elements

Web content tags cannot be used in short text and text elements.

HTML elements

Any combination of web content tags can be used in HTML elements with the following exceptions:

  1. We 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=' "/>']

  2. We 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 Manager 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"]

Highlighting of rich text elements is not enabled by default. To enable this support, ensure the server administrator adds the following property to the WCM WCMConfigService service:

  • Property: wcm.enableWCMTagHighlighting
  • Value: true

The following tag formats are invalid:

  1. 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=' "/>']

  2. The use of double quotes inside attribute values.

    • [component name="example" start="<a href="" end="">link</a>"]
    • [component name="example" start="<img src="" end=""/>"]

  3. Embedding tags inside other HTML tags.


Parent Storing text and HTML

Related:

Set service configuration properties