Document Modelling

Paragraph Styles

Customise your copytext by creating different paragraph styles.

To customise your copytext, you can create multiple paragraph styles from which you can choose in Sophora's copytext editor. The interpretation of different paragraph styles is configurable for the delivery. Some possible examples:

  • Paragraph style Pagebreak creates a page break. Using this paragraph style, you can divide a single document into multiple pages.
  • Paragraph style Citation may cause the delivery to highlight the paragraphs's content somehow, e.g. in a box or in italic font.
  • Paragraph style Line creates a <hr> tag in the delivery.
+++
+++ (Image: subshell/CC BY)

Paragraph Style Properties

Each paragraph style depends on a corresponding system document. Thus, if you would like to edit your paragraph styles, open the administration view and select Document Configuration >> Paragraph Styles to create a new paragraph style or to edit an existing one. The configurable settings of a paragraph style regarding its design are:

  • a Label that is shown when choosing from the paragraph styles in the copytext, as well as an internal Name
  • a Display Type and a Background Color, both defining the display of the paragraph in the copytext - note, that some display types have a default background color that is used if no color is specified
  • the availability of language, quote or abbreviation markups as well as text links and images in the paragraph (can be configured separately for each of those features)
  • an optional maximum recommended number of characters. If this number is exceeded, the user will be notified, but it is still possible to save the document.
  • an icon for the paragraph style
+++
+++ (Image: subshell/CC BY)

Paragraph Properties

You can also define properties for each paragraph style. These will be shown in the component details view if you select a paragraph from the component structure. If you check Inline paragraph fields, those properties will also be shown directly in the paragraph. To do so, you have to take the following steps:

Prepare the paragraph node type

  1. Open the sophora-extension-nt:paragraph nodetype.
  2. Put the sophora-extension:paragraphProperties child node on the components tab.
  3. Open the child node configuration of the child node and set sophora-extension-mix:paragraphProperties as a valid child node type.

Create the property nodetype

  1. Create a new nodetype containing the properties which should be used for a paragraph style.
  2. Create a nodetype configuration for this nodetype and put the properties on the base tab.
  3. You may also configure a child node with the dynamic table input field type. Note, that this child node will always be positioned at the end of the paragraph properties, independent from the position in the tab configuration.
  4. Select sophora-extension-mix:paragraphProperties as mixin for this nodetype.

Configure property nodetypes for a paragraph style

  1. Open the paragraph style document for the paragraph style you wish to add paragraph properties to.
  2. Enter the nodetype name of your created property nodetype into the field Nodetypes of the paragraph fields

Last modified on 11/11/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon