Document Modelling

Copytext

Learn more about the childnode "Copytext".

The copytext is Sophora's most convenient and advanced field type for writing texts. The copytext supports different paragraph styles, paragraph images and boxes. The input field type Copytext requires the node type sophora-extension-nt:copytext as valid child node, which has to be registered as document extension first, if not already available.

After registering the copytext extension, you have to take further steps to correctly configure the copytext node type and its dependencies. The following instructions will help you to configure the necessary node type configurations. If you do not have a node type configuration for the mentioned node types, you have to create a new one.

In the nodetype sophora-extension-nt:copytext, you should

  • add its child node sophora-extension:paragraph to the components tab
  • add a label to it (e.g. Paragraph)
  • add sophora-extension-nt:paragraph as a valid child node type to it

In the nodetype sophora-extension-nt:paragraph, you should

  • add the child nodes sophora-extension:paragraphbox and sophora-extension:paragraphimage to the components tab
  • add the respective labels to it (e.g. Paragraph Box)
  • add subtypes of sophora-extension-nt:group as valid child node types to the paragraph box and sophora-extension-nt:paragraphimage to the paragraph images

In the nodetype sophora-extension-nt:paragraphimage, you should

  • add its childnode sophora-extension:image to the components tab
  • add a label to it (e.g. Image)
  • add all reference document types for images as valid child node types

Now you are ready to configure a copytext field into a document. In the configuration of the childnode you want to configure as a copytext, you need to select Copytext as the input field type and sophora-extension-nt:copytext as the valid child node name. You also have to select the set of paragraph types you would like to enable for this copytext instance. Additionally you can select a default paragraph type (since DeskClient 3.6.1). New paragraphs will be created with this type seleted. Otherwise, the default paragraph type is automatically determined from the set of enabled paragraph types.

Paragraph Table Settings

Paragraph tables support additional settings such as alignment, that can be activated using toggle buttons. Each button represents a single value out of a select value provider, that can be used to set a CSS class in the rendering of the table.

To enable the use of these settings, you have to perform the following configuration steps:

  • In the nodetype editor of sophora-extension-nt:copytextTableSettings, move the property sophora-extension:tableSettings onto the Base tab.
  • Modify the property's settings; select Checkbox (Multi) as input field type.
  • Select a select value provider of your choice and set the additionally required settings.

Last modified on 3/9/20

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

Icon