​PageObject: Simple text

​This PageObject renders pure text content—if HTML is inserted, all tags will be stripped. This PageObject is ideal for situations, where the template developer wants to ensure that some text is placed within a specific HTML tag.

For example: The PageObject “Rich Text” does not provide a first class headline <h1> to ensure that only one <h1> exists on every page. This means, the <h1> needs to be included in the template code and configured with a PageObject Text.

HTML example (system generated)

<div class="fx_po_content fx_po_text">
​This PageObject renders as inline element.

​Demo content

Available parameters:

  • length: [int] Character count of the demo text.
  • copy: [string] If defined this text is used as demo text.
  • dotAtTheEnd: [bool] Defines wether a full stop at the end of the text is wanted. Only used for generated random text, not for text configured by “copy”. Optional, default is false.

Either the parameter “length” or the parameter “copy” is required. A combination of both is possible.

Configuration examples

{{ fx_page.slot("SLOT_NAME", _context, {"content": [
   {"type": "text", "config": {"copy": "Loren ipsum sin dolet"}}
] }) }}

{{ fx_page.slot("SLOT_NAME2, _context, {"content": [
   {"type": "text", "config": {"length": "200"}}
] }) }}

{{ fx_page.slot("SLOT_NAME3, _context, {"content": [
   {"type": "text", "config": {"copy": "Loren ipsum sin dolet", "length": "200"}}
] }) }}
​For more details how to implement demo content please refer to the Demo Content Documentation.

TextLab (Private BETA)

With the TextLab configuration section (“textlab”) the TextLab user interface of the PageObjects “Simple Text” and “Rich Text” will be prefilled with the defined values, which makes it a lot easier for the website editors to produce fitting content for your template. Be aware that your TextLab configuration is not a rigid restriction, but a suggestion which may be overridden by the editor.

Available parameters:

  • words: [int] Defines how many words a text for this PageObject should contain. Minimum allowed value is 1, maximum allowed value 2,000.
  • maxChars: [int] (optional) Defines the maximum count of characters allowed in the text for this PageObject. Minimum allowed value is 3, maximum allowed value 25,000.

TextLab is only available for the PageObjects Simple Text and Rich Text.

Configuration examples

Example 1: TextLab configuration

"textlab": {"words": WORD_COUNT, "maxChars": MAXIMUM_CHARACTER_COUNT}

Example 2: Within a complete slot markup

{{ fx_page.slot("SLOT_NAME", _context, {
    "textlab": {"words": 50, "maxChars": 280}
}) }}