Readonly
areaThe area of the field on the canvas as defined by the parameter. If the actual position is required, have a look at FieldBoundingBox and GetBoundingBox.
Flag to control if the field is visible or hidden. Flipped fields will be mirrored horizontally.
Flag to control if the field is vertically flipped or not. Flipped fields will be mirrored vertically.
The height of the field on the canvas. Value in points.
Flag to control if the field is visible or hidden. Hidden fields will not show in the UI and not on the output.
Readonly
page: numberThe index of the page this field is on. The index is zero based.
The rotation of the field on the canvas. Value in degrees. The rotation center is the top left coordinate.
Readonly
subFor spread setups only this is the index of the sub page. The index is zero based.
The width of the field on the canvas. Value in points.
The x coordinate of the field on the canvas. Value in points.
The y coordinate of the field on the canvas. Value in points.
Readonly
zThe z-index of the field on the page. The z-index defines the order of the fields on the page. The higher the z-index, the more on top the field is.
The border object defines the field border settings - which includes not only the border itself but also the background fill of the field. This is available for all field types except path fields.
Readonly
idThe id of the field (GUID) as a unique identifier.
Readonly
infoThe info or meta data details of the field.
The custom data is an arbitrary object which can be used to store additional information against the field. This is for scripting usage only. Note that there is only a single custom data object per field. So multiple scripts would have to consider a merge or overwrite strategy.
The name of the field. By default empty, this can be used to provide semantic information to the field and will be used for logging, errors and debugging, but can also be helpful for field retrieval. The name of a field doesn't have to be unique and duplicates can happen.
The sequence is used for auto mapping values when applying layouts. In order to determine which field of the new layout should be populated with the value of which field in the old layout the sequence is used. This is independent of creation order or z-index and allows to semantically control this. When generating fields the sequence is automatically set as an incrementing number.
The list of tags. Tags can be also used to retrieve fields and store additional meta data against the field. Note that a tag cannot contain the '|' character.
Readonly
issuesThe issues for this text field.
Readonly
restrictionsThe restrictions for this text field.
The shadow object defines the field shadow settings. This is available for all field types except path fields.
Readonly
textThe text specific options for this field.
The text of the field as it came from the input source. This is always plain text - but you can styles to understand additional rich text formatting for individual glyphs.
The default format
The field type defines how the field can grow when text is being entered.
Readonly
internalThe internal text matches the normal data but may contain additional line breaks due to the line wrapping of the field. This can be used if the script needs to understand exactly how the text is rendered.
Readonly
options: { Advanced text options are defined in this object.
Readonly
fitThe fit to box feature allows to control how the text is automatically resized to fit the available space.
Flag to control if automatic resizing should be enabled.
The maximum font size to use. This is in points. The automatic sizing would never go above this even if the text would not fit.
The minimum font size to use. This is in points. The automatic sizing would never go below this even if the text would not fit.
Flag to control if the automatic resizing should include automatic line wrapping. Otherwise the size is adjusted without breaking up any lines.
Readonly
paragraphThe paragraph options used for this field.
The additional horizontal spacing to add between characters in points.
The leading defines the vertical spacing between lines. The leading is a factor of the line height. Default would be 1.3 meaning the line height is 130% of the font size.
The additional vertical spacing to add between paragraphs in points. Paragraphs are identified by an empty line between them.
The additional horizontal spacing to add between words in points.
Readonly
renderThe text render mode of the glpyhs.
For font and outline modes, this is the color of the outline (as we support two colours). This can be any valid MegaEdit color value.
Specifies the enabled render mode.
The width of the outline in points.
If text flow is used, this defines the field chain how the text will flow.
The id of the next field in the chain. Or null if this is the last field or text flow is not used.
The id of the previous field in the chain. Or null if this is the first field or text flow is not used.
The text type defines if the casing of the text should be changed.
The text type defines how the field is being used externally.
The rich text styles can be accessed through this property.
This contains an object where each key is the line index, and the value defines the format ranges within that line.
The text direction defines how the text flows for this field.
The vertical alignment of the field. This is set ofr the intire field, not individual lines.
Readonly
typeThe type of the field
Readonly
uioptionsThe UI options for this text field.
Converts a relative field position (a position within the field from the top/left corner of the field without the rotation applied) to a global location on the canvas.
The point as the relative position.
The converted point as the global location.
Little helper to calculate the field bounding box - this includes also information about the location of all 4 corner points of the field on teh canvas.
The bounding box of the field. This is the area the field occupies on the canvas.
Rearranges the field on the canvas by adjusting the z-index in relation to the other fields. Updates the field properties.
The z-index change defined by the mode.
Save the changes of the script object back into the editor. This will update the field with the latest changes, but not every change will be reflected directly in the UI. Some changes would require reinitialization.
Note that not all properties can be saved with this function:
Saves the changes of the script back into the editor, while allowing to control certain actions via a save options object. For further information of what can be saved Save
The save options to use for this operation. If the parameter is a boolean, the value is used for the 'addUndo' flag of SaveOptions.
Generated using TypeDoc
An text field will contain text in various formats.