Site Manager Developer Manual / Version 2110
Table Of Contents
If you have defined your style groups, you need to add them to the Site Manager.
The right place is the editor.xml
file using the attribute
addStyleSheetGroups
of the
Property
element. The following example shows how to add
your newly defined style group
inlineformat
and the predefined style group
list-item
to the property RichText
of the "Article" document:
<Documents> <Document type="Article"> <Property name="RichText" editorClass="RichTextPane" addStyleSheetGroups="inlineformat(inline) list-style(ol,ul) freetext:string(inline)"> <Toolbar> <StyleGroup name="inlineformat" show="button"/> </Toolbar> </Property> </Document> . . </Documents>
Example 3.3. Add the style group to the editor
After you have restarted the
Content Editor
the style group
inlineformat
will appear in the formatting button of the toolbar and the tab
Inline text
of the attribute editor and the style group
list-style
will appear in the
List
tab of the
attribute editor.
The attribute addStyleSheetGroups
As you can see from the example above, multiple style groups can be added to the
addStyleSheetGroups
attribute, simply separated by blanks. The element names in the brackets are
optional. They limit the offering of the style group to the elements in brackets. Therefore, the example style
group
inline-format
will only be offered for inline text but not, for example, for paragraphs and
the style group
list-style
will be offered to bullet and numbered lists. You can use the
p
, table
, tr
, td
, li
, ul
,
ol
, a and
img
elements of the
coremedia-richtext-1.0.dtd
file and the
additional keywords inline
,
block
or flow
.
inline
: The style group will be offered for all inline elements.block
: The style group will be offered for all block elements.flow
: The style group will be offered for all elements.
If you use one of these additional keywords, you cannot add any other element or keyword to the style group. For
example
inline-format(ul,block)
is forbidden.
If you want to add a style group for free text you have to add the attribute
string
or
identifier
:
string
: Enter free text.identifier:
Enter free text with characters which are valid for very strict CSS identifiers.
freetext:string(inline)
, for instance
The elements Toolbar and StyleGroup
You can use the elements
Toolbar
and
StyleGroup
to configure the appearance of the
style groups in the toolbar of the RichTextPane. You can define for each style group,
to be displayed as a combo box (default),
to be added to the button,
not to be shown in the toolbar.
Add the element
Toolbar
as a child element of the element
Property
and the element
StyleGroup
as a child of Toolbar
.
StyleGroup
has the following two
attributes:
Attribute | Description |
---|---|
name | Name of the style group to configure. |
show |
How to display the style group. The following options exist:
|
Table 3.5. Attributes of StyleGroup element