Documentation Center

Creating a format area field

Format areas can contain both alpha-numeric values and formatting. A format area is a type of text field that allows for rich text formatting. You can configure several properties for a format area field.

About this task

Document Type
This setting determines the rules that are applied to this format area when Components based on this Schema are validated. You have the option of selecting Strict or Transitional document types.
For more information about Strict and Transitional rules, consult the World Wide Web Consortium (W3C) description of these validation rules. Validation occurs when the content author:
  • saves a Component
  • presses the Validate button
  • changes tabs in the format area
Note that Strict and Transitional rules associated with a Schema have related formatting options. Refer to Default format settings for Transitional and Strict Document Types for more information.
W3C Accessibility Level
The Web Content Accessibility Guidelines (WCAG) setting that you choose shows or hides buttons for the various WCAG levels.
Formatting features
Allow authors to format text by enabling formatting options that will be made available in a toolbar. You can configure the following settings:
Allowed actions

Formatting actions that a user can perform on text within the format area. For example, if you disallow the Bold action, authors will not be able to make text bold. The allowed actions are, by default, constrained by the Document Type setting to ensure that the options available to authors corresponds with the accessibility level that you would like to apply to the format area. Default format settings for Transitional and Strict Document Types describes the default formatting settings for the Transitional and Strict Document Types.

Allowed styles

Styles that a user can apply to text within a format area. These styles are configured using a cascading style sheet. For more information, see Format area configurations.

Filtering XSLT

An XSLT that is applied when a user saves a Component based on this Schema. The XSLT applies transformation to the text in the Format Area. For example, you may use this option if your Page structure uses H1 formatting and you do not want the format area to apply the same formatting.

Example
The following example shows an XSLT transformation that changes any h1 tags to h2 tags:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
><xsl:output method="xml"/>
	<xsl:template match="node()|@*">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>
	<xsl:template match="h1">
		<h2><xsl:value-of select="."/></h2>
	</xsl:template>
</xsl:stylesheet>

Procedure

  1. In the Design tab or Metadata Design tab of the Schema that you are creating, fill in the following fields:
    • XML Name — This is the XML name of the field. The XML name can only contain letters without accents (A-Z, a-z), digits (0-9), underscores "_" and/or hyphens "-". The first character of the XML name must be a letter or an underscore character.
    • Description — A description of the field. This description is used as a label in the Component.
    • Type — Select Text.
  2. Specify how many rows the field should contain. Format areas must contain at least two rows.
  3. (Optional) To allow multiple field of this type, select Allow multiple values. This setting allows a content author to add more than one value to this field.
  4. To set this text area as a format area, select Allow rich text formatting.
  5. Select the Document type:
    • Select Strict if you want to apply Strict nesting rules to the elements in this format area
    • Select Transitional if you want to apply Transitional nesting rules to the elements in this format area

    If you change the Document Type, a prompt asks you if you want to use the default Allowed Actions for this Document Type. Confirming this ensures that content authors only have access to formatting options that are compatible with the Document Type. For information about the default settings associated with these settings, see Default format settings for Transitional and Strict Document Types.

  6. Select the W3C Accessibility level that will be applied to this format area:
    • none (default)
    • WCAG Priority 1
    • WCAG Priority 2
    • WCAG Priority 3
  7. Click Edit Formatting Features to specify the type of character formatting which content authors will be able to use in this format area.
  8. In the Formatting features dialog, you can edit the following:
    • On the Allowed Actions tab, select the formatting actions that you would like to allow authors to be able to perform when adding text to a format area.
    • On the Allowed Styles tab, select the styles that you would like to allow authors to be able to assign to text when adding text to a format area.
    • (Optional) On the Filtering XSLT tab, define a transformation XSLT that will be applied to this format area.

    Click OK when you have modified the formatting features.

  9. If you want the field to be populated with a default value, fill in the Default value field.
  10. In the Schema window, enable the Mandatory check box if you want this field to be mandatory.
  11. If applicable, select a Custom URL.