Information Classification: External Restricted.
See https://www.chili-publish.com/security

TextFrame XML

XML Structure

Any item within a frames list of type "text", corresponding to a ?Document Object Model - TextFrame object:

<document>
  <pages>
    <item>
       <frames>
          <item type="text" x="10mm" y="10mm" width="50mm" height="20mm" >
             <textFlow>
                 ...VALID TEXTFLOW XML HERE...
             </textFlow>
          </item>
       </frames>
    </item>
  </pages>
</document>

Normal Text

The "textFlow" property of a text frame contains the actual text content (and most formatting options) to be rendered within the frame. See ?TextFlow and ITextLayoutFormat XML for more information on the xml structure of such a flow.

It is serialized within a "textFlow" sub-node of the frame's item node. That in turn will contain the full TextFlow XML (which for this particular property has almost the same name, but starting with a capital "T"). A Text Frame which contains variables will (once serialized by CHILI editor) also have a populated "displayTextFlow" property (see lower on this page):

<item type="text" x="10mm" y="10mm" width="50mm" height="20mm" >
   <textFlow>
        <TextFlow fontFamily="Arial_Regular">
            <p><span fontSize="12">A variable: </span><span fontSize="20">%VARIABLE_NAME%</span></p>
        </TextFlow>
   </textFlow>
   <displayTextFlow>
        <TextFlow fontFamily="Arial_Regular">
            <p><span fontSize="12">A variable: </span><span fontSize="20">the variable value</span></p>
        </TextFlow>
   </displayTextFlow>
</item>

NOTE: this is NOT valid XML, it is included just for demonstration purposes. See ?TextFlow and ITextLayoutFormat XML for the correct TextFlow XML description

Container Settings

While most text formatting is serialized in the TextFlow XML, there are also various settings on the frame itself which influence text rendering:

  • verticalAlign
  • columns and columnGap
  • ignoreWrap
  • hasTextStroke and textStrokeXXX
  •  baseLineGridUseCustom and baseLineGridOptions

Text in shape and text on path

Texts can be rendered within a complex shape (rather than the default rectangle), or following a complex shape (text on path).

In both cases, the definition of the path itself is serialized in the "clippingPath" property. See ?ShapeFrame XML and Paths XML for more information on serializing shapes.

To render a text within a complex shape, "hasClippingPath" should additionally be set to "true". To render the text on the path, "textOnPath" should be set to true (the two are of course mutually exclusive).

Autogrow

If the "autoGrowFrame" property is "true", the other "autoGrowXXX" properties influence the behavior of the growing frame.

Stories / Chains

Linking multiple text frames together in a chain (building a story, which can also span multiple pages) is done by populating:

  • chainNextFrame
  • chainPreviousFrame

(both with references to the other text frame, which in XML means that the properties contain the IDs of the other frames, if any).

chainFirstFrame and chainLastFrame are included for display purposes only (or for easy access using the JavaScript API).

The textFlow (and variable settings) of the first frame in the chain are used.

Variable Text and Settings

A text frame can be configured to contain variables (by setting its "isVariable" property to "true"). This will influence the behavior of the frame inside the Editor (the source text can't be edited by typical end users, for example).

When a text frame contains variables, its "displayTextFlow" property will be automatically filled by CHILI Editor based on various rules, such as:

  • Replacing variable display values
  • Removing paragraphs
  • Applying copyfitting
  • etc...

To influence this, there are a lot of settings within the variables themselves  (?Variables XML), and some additional properties on the text frame:

  • isVariable (which should be "true")
  • applyCopyFitting and copyFittingXXXXX
  • removeEmptyParagraphs

NOTE: setting the content of a displayTextFlow in a document's XML has no effect. This flow is automatically calculated/populated by CHILI Editor

All information on this page must be treated as External Restricted, or more strict. https://www.chili-publish.com/security