MergeFieldDefinition
The definition of a single merge field.
Depending on the type, some of the properties may not be relevant:
- For
textmerge fields, theid,label, anddefaultValueproperties are used. - For
blockmerge fields, theid,label,height, anddefaultValueproperties are used. - For
imagemerge fields, theid,label,height,width, anddefaultValueproperties are used.
Properties
-
defaultValue : MergeFieldDataSetValue | undefinedmodule:merge-fields/mergefieldsconfig~MergeFieldDefinition#defaultValueDefault value of the merge field.
It is used if a value for given merge field has not been provided in a data set and in the default values preview mode.
-
height : number | undefinedmodule:merge-fields/mergefieldsconfig~MergeFieldDefinition#heightThe height of the non-text merge field in pixels.
It is used only for merge fields of type
blockandimage. If unset, the default height for block is 120 pixels and for image - 400 pixels.Defaults to
120 (for block)/ 400 (for image) -
id : stringmodule:merge-fields/mergefieldsconfig~MergeFieldDefinition#idThe unique identifier of the merge field.
If label is not specified, the ID will be used as a label.
The list of allowed characters includes:
a-z,A-Z,0-9,_,., and-. -
label : string | undefinedmodule:merge-fields/mergefieldsconfig~MergeFieldDefinition#labelThe human-readable label of the merge field.
It is displayed by the feature's UI and inside the editing area.
-
type : MergeFieldType | undefinedmodule:merge-fields/mergefieldsconfig~MergeFieldDefinition#typeThe type of the merge field. It determines how the merge field is rendered in the editor editing area.
Possible options are
text(meaning the merge field will be inline),blockandimage.Defaults to
'text' -
width : number | undefinedmodule:merge-fields/mergefieldsconfig~MergeFieldDefinition#widthThe width of the image merge field in pixels.
It is used only for merge fields of type
image. If unset, the default width is 400 pixels.Defaults to
400