References
Predefined Styles
The following styles are predefined in the default installation:
Name | Style id | css code |
---|---|---|
Standard | p | Default paragraph styling |
Heading 1 | h1 | h1 { font-weight:bold; font-size: 125%; margin: 0.8em 0 0.5em 0; } |
Heading 2 | h2 | h2 { font-weight:bold; font-size: 120%; margin: 0.8em 0 0.5em 0; } |
Heading 3 | h3 | h3 { font-weight:bold; font-size: 110%; margin: 0.8em 0 0.5em 0; } |
Notice | p:stages_description_notice | p.stages_description_notice { border-left: .75ex solid #FCAE3F; font-weight: bold; padding: 1ex 0 1ex 1ex; } |
Caption | p:stages_description_caption | p.stages_description_caption { font-size: 95%; line-height: 1.1em; margin-top: 0; margin-bottom: 0; } |
Allowed HTML Tags
This list is a short snippet of the validation schema:
- em
- u
- strike
- sub
- sup
- span
- br
- img
- a
- p
- hr
- table
- h1-h6
- ul
- ol
Rich Text Validation Schema
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://namespace.methodpark.de/composer/richtext/model" xmlns:rt="http://namespace.methodpark.de/composer/richtext/ model" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" elementFormDefault="qualified"> <!-- Stages-Class Restrictions --> <xsd:simpleType name="StagesClassName"> <xsd:restriction base="xsd:string"> <xsd:pattern value="stages_[\\w-_]+" /> </xsd:restriction> </xsd:simpleType> <!-- CSS Style Restriction --> <xsd:simpleType name="StyledBlockStyle"> <xsd:restriction base="xsd:string"> <xsd:pattern value="(margin-left:\s*\d+px;\s*|text-align:\s*(left| center|right|justify);\s*)*" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="ListItemStyle"> <xsd:restriction base="xsd:string"> <xsd:pattern value="text-align:\s*(left|center|right|justify);?" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="TableAlignment"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="left"></xsd:enumeration> <xsd:enumeration value="center"></xsd:enumeration> <xsd:enumeration value="right"></xsd:enumeration> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="TableCellVerticalAlignment"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="top"></xsd:enumeration> <xsd:enumeration value="middle"></xsd:enumeration> <xsd:enumeration value="bottom"></xsd:enumeration> <xsd:enumeration value="baseline"></xsd:enumeration> </xsd:restriction> </xsd:simpleType> <!-- CSS Style Restriction --> <xsd:simpleType name="Color"> <xsd:restriction base="xsd:string"> <xsd:pattern value="(background-color:\s*#[0-9a-fA-F]{6};\s*|color: \s*#[0-9a-fA-F]{6};\s*)*" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="TableStyle"> <xsd:restriction base="xsd:string"> <xsd:pattern value="(margin-left:\s*\d+px;\s*|width:\s*\d+(px|%);\s*| background-color:\s*rgb(s*\d{1,3},\s*\d{1,3},\s*\d{1,3});\s*|bordercolor:\s*rgb(s*\d{1,3},\s*\d{1,3},\s*\d{1,3});\s*)*" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="TableCellStyle"> <xsd:restriction base="xsd:string"> <xsd:pattern value="(height:\s*\d+(px|%);\s*|width:\s*\d+(px|%);\s*| border-width:\s*\d+px;\s*|white-space:\s*nowrap;\s*|background-color:\s*rgb (s*\d{1,3},\s*\d{1,3},\s*\d{1,3});\s*|border-color:\s*rgb(s*\d{1,3}, \s*\d{1,3},\s*\d{1,3});\s*)*" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="ImageClass"> <xsd:restriction base="xsd:string"> <xsd:pattern value="stages_(unmanaged|no(display|print)_(begin|end))" /> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="Element"> <xsd:attribute name="id" type="xsd:string" use="optional" /> </xsd:complexType> <xsd:complexType name="CharacterElement" mixed="true"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:group ref="rt:inlineContent" /> </xsd:choice> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="FormatCharacterElement" mixed="true"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:group ref="rt:inlineContentWithLinks" /> </xsd:choice> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="Span" mixed="true"> <xsd:complexContent> <xsd:extension base="rt:FormatCharacterElement"> <xsd:attribute name="style" type="rt:Color" use="optional" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- Needs to be more restrictive for validation: <xsd:complexType name="Image"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:attribute name="class" type="rt:ImageClass" use="required" /> <xsd:attribute name="data-pkit-unmanaged" type="xsd:string" use="optional" /> <xsd:attribute name="src" type="xsd:string" use="required" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> --> <!-- BEGIN_IMAGE_TYPE --> <xsd:complexType name="Image"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:attribute name="class" type="xsd:string" use="optional" /> <xsd:attribute name="src" type="xsd:string" use="required" /> <xsd:attribute name="data-pkit-unmanaged" type="xsd:string" use="optional" /> <xsd:attribute name="data-pkit-ref" type="xsd:string" use="optional" /> <xsd:attribute name="align" type="xsd:string" use="optional" /> <!-- only for copy & paste, because we don't want the attribute to be removed on cleanup --> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- END_IMAGE_TYPE --> <xsd:complexType name="LineBreak" /> <xsd:complexType name="HorizontalRuler" /> <!-- Needs to be more restrictive for validation: <xsd:complexType name="Anchor"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> --> <!-- BEGIN_ANCHOR_TYPE --> <xsd:complexType name="Anchor" mixed="true"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:attribute name="name" type="xsd:string" use="optional" /> <xsd:attribute name="target" type="xsd:string" use="optional" /> <xsd:attribute name="title" type="xsd:string" use="optional" /> <xsd:attribute name="href" type="xsd:string" use="optional" /> <xsd:attribute name="data-pkit-ref" type="xsd:string" use="optional" /> <xsd:attribute name="class" type="rt:StagesClassName" use="optional" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- END_ANCHOR_TYPE --> <xsd:complexType name="StyledBlockElement"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:attribute name="style" type="rt:StyledBlockStyle" use="optional" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="TextContainer" mixed="true"> <xsd:complexContent> <xsd:extension base="rt:StyledBlockElement"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:group ref="rt:inlineContentWithLinks" minOccurs="0" maxOccurs="unbounded" /> </xsd:choice> <xsd:attribute name="class" type="rt:StagesClassName" use="optional"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="TableCell"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:group ref="rt:cellContent" /> </xsd:choice> <xsd:attribute name="colspan" type="xsd:int" default="1" use="optional" /> <xsd:attribute name="rowspan" type="xsd:int" default="1" use="optional" /> <xsd:attribute name="valign" type="rt:TableCellVerticalAlignment" use="optional" /> <xsd:attribute name="style" type="rt:TableCellStyle" use="optional" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="TableRow"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:sequence> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="td" type="rt:TableCell" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="th" type="rt:TableCell" minOccurs="0" maxOccurs="unbounded" /> </xsd:choice> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="TableBody"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:sequence> <xsd:element name="tr" type="rt:TableRow" minOccurs="0" maxOccurs="unbounded" ecore:name="rows"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="Table"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:choice> <xsd:sequence minOccurs="0" maxOccurs="unbounded"> <xsd:element name="tr" type="rt:TableRow" ecore:name="rows" /> </xsd:sequence> <xsd:sequence minOccurs="1" maxOccurs="1"> <xsd:element name="tbody" type="rt:TableBody" ecore:name="tableBody" /> </xsd:sequence> </xsd:choice> <xsd:attribute name="border" type="xsd:int" use="optional" /> <xsd:attribute name="cellpadding" type="xsd:string" use="optional" /> <xsd:attribute name="cellspacing" type="xsd:string" use="optional" /> <xsd:attribute name="align" type="rt:TableAlignment" use="optional" /> <xsd:attribute name="style" type="rt:TableStyle" use="optional" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="ListItem" mixed="true"> <xsd:complexContent> <xsd:extension base="rt:Element"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:group ref="rt:listItemContent" /> </xsd:choice> <xsd:attribute name="style" type="rt:ListItemStyle" use="optional" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="List"> <xsd:complexContent> <xsd:extension base="rt:StyledBlockElement"> <xsd:sequence minOccurs="1" maxOccurs="unbounded"> <xsd:element name="li" type="rt:ListItem" /> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="Editor" mixed="true"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:group ref="rt:blockContent" /> </xsd:choice> </xsd:complexType> <xsd:group name="inlineContent"> <xsd:choice> <xsd:element name="strong" type="rt:FormatCharacterElement" /> <xsd:element name="em" type="rt:FormatCharacterElement" /> <xsd:element name="u" type="rt:FormatCharacterElement" /> <xsd:element name="strike" type="rt:FormatCharacterElement" /> <xsd:element name="sub" type="rt:FormatCharacterElement" /> <xsd:element name="sup" type="rt:FormatCharacterElement" /> <xsd:element name="span" type="rt:Span" /> <xsd:element name="br" type="rt:LineBreak" /> <xsd:element name="img" type="rt:Image" /> </xsd:choice> </xsd:group> <xsd:group name="inlineContentWithLinks"> <xsd:choice> <xsd:group ref="rt:inlineContent" /> <xsd:element name="a" type="rt:Anchor" /> </xsd:choice> </xsd:group> <xsd:group name="headings"> <xsd:choice> <xsd:element name="h1" type="rt:TextContainer" /> <xsd:element name="h2" type="rt:TextContainer" /> <xsd:element name="h3" type="rt:TextContainer" /> <xsd:element name="h4" type="rt:TextContainer" /> <xsd:element name="h5" type="rt:TextContainer" /> <xsd:element name="h6" type="rt:TextContainer" /> </xsd:choice> </xsd:group> <xsd:group name="lists"> <xsd:choice> <xsd:element name="ul" type="rt:List" /> <xsd:element name="ol" type="rt:List" /> </xsd:choice> </xsd:group> <xsd:group name="listItemContent"> <xsd:choice> <xsd:element name="p" type="rt:TextContainer" /> <xsd:group ref="rt:headings" /> <xsd:group ref="rt:lists" /> <xsd:group ref="rt:inlineContentWithLinks" /> </xsd:choice> </xsd:group> <xsd:group name="cellContent"> <xsd:choice> <xsd:element name="p" type="rt:TextContainer" /> <xsd:element name="hr" type="rt:HorizontalRuler" /> <xsd:element name="table" type="rt:Table" /> <xsd:group ref="rt:headings" /> <xsd:group ref="rt:lists" /> </xsd:choice> </xsd:group> <xsd:group name="blockContent"> <xsd:choice> <xsd:group ref="rt:inlineContentWithLinks" /> <xsd:group ref="rt:cellContent" /> </xsd:choice> </xsd:group> <xsd:element name="body" type="rt:Editor" /> </xsd:schema>
Configuration Properties
Property Name | Default Value | Description |
---|---|---|
process.description. displayUnmanagedSections. enabled | true | If set to “true” unmanaged sections will be rendered in all view modes except of edit mode where only the source will be displayed. If set to “false” unmanaged sections will be omitted on rendering for all views (except of edit mode). |
global.editor.format | p,h1,h2,h3 p:stages_description_notice p:stages_description_caption | Defines the formats which are selectable in the editor for the descriptions of process elements and the process overview page. |
global.editor.format. migration | p:heading1=h1,p:heading2=h2, p:heading3=h3,p:heading4=h3, p:heading5=h3,p:heading6=h3, h1:heading1=h1,h2:heading2=h2, h3:heading3=h3,h4:heading4=h3, h5:heading5=h3,h6:heading6=h3, h3:heading1=h1,h4:heading2=h2, h5:heading3=h3,h4=h3, h5=h3,h6=h3,p:description=p, p:code=p:stages_description_code | Define a mapping from the old styles to the new ones, so Stages can automatically exchange the formats, when a description is reworked. (syntax:$oldTag:$oldClass=$newTag: $newClass,…). In all cases the tag is mandatory but the class is optional. The descriptions are only converted on demand (when they are edited), therefore the custom.css should include the old styles as well as the new ones. |
legacy.description. migration. unmanagedSection. templates | pre, script, dl, iframe, :onclick, div:id, img | The defined tags are converted to unmanaged sections. |
legacy.description. migration. unmanagedSection.regex | Th matched regular expression is converted to an unmanaged section. | |
legacy.description. migration.copyAttribute. fromParent.templates | tr:style | Copies the given tag:attribute: [value],tag:attribute: [value] from the parent to the child tag. Before: <table> <tr style=“123”> <td> abc </td> </tr> </table> After: <table> <tr> <td style=“123”> abc </td> </tr> </table> |
legacy.description. migration.copyAttribute. toParent.templates | Copies the given tag:attribute: [value],tag:attribute: [value] from child tag to the parent tag. If the property is set to p:style:“background:#FF00FF” Before: <table> <tr> <td style=“width:50px”> <p style=“background:#FF00FF”>content</ p> <p style=“background:#FF0000”>content2</ p> </td> </tr> </table> After: <table> <tr> <td style=“width:50px background:#FF00FF”> <p>content</p> <p style=“background:#FF0000”>content2</ p> </td> </tr> </table> |