TemplateCustomizationObjects

DSHDLib. Namespace

TemplateCustomizationObjects

Source:

Type Definitions

TemplateCustomizationObject

Description:
Source:
Properties:
Name Type Description
elements Object.<string, DSHDLib.TemplateCustomizationObjects.TemplateCustomizationObjectElementUpdates> A map of data to populate based on element name matches
classes Object.<string, DSHDLib.TemplateCustomizationObjects.TemplateCustomizationObjectElementUpdates> A map of data to populate based on element class name matches
replacements Object.<string, DSHDLib.TemplateCustomizationObjects.TemplateCustomizationObjectReplacements> A map of replacements to make based on matched properties
An object containing data to populate a template. Read full documentation here
Type:
  • Object

TemplateCustomizationObjectElementUpdates

Description:
Source:
Tutorials:
Properties:
Name Type Attributes Description
color string <optional>
A color to set on matching text, shape and line elements (RGB/CMYK/SPOT)
text string <optional>
Text to replace on matching text elements
auto_fit bool <optional>
A value indicating weither to update font size dynamically to fit the supplied "text" property within any matching textbox's current width/line count
font Object <optional>
Update the font on matching text elements
Properties
Name Type Attributes Default Description
family string The name of the font family to set
bold bool <optional>
false A value indicating weither to use a bold version of the new font (if available)
italic bool <optional>
false A value indicating weither to use an italic version of the new font (if available)
stroke Object <optional>
Update the stroke on matching text, shape and image elements
Properties
Name Type Attributes Description
color string <optional>
The color to apply (RGB/CMYK/SPOT)
url string <optional>
A public or signed url reference or a data url for a svg, png or jpg file. This will either be placed in a matching zone or replace a placeholder shape element
position_relative_to_original Object <optional>
Override the default position (relative to the matching zone/shape) for images placed via the "url" property
Properties
Name Type Attributes Description
horizontal_align string <optional>
A horizontal position of "left", "center" or "top"
horizontal_align string <optional>
A vertical position of "top", "center" or "bottom"
masked_media Object <optional>
Set or update a masked image in matching shape elements
Properties
Name Type Attributes Description
url string <optional>
A public or signed url reference or a data url for a png or jpg file that will be masked in matching shape elements
color_overlay Object <optional>
A color overlay to apply to a matching masked image
Properties
Name Type Attributes Description
color string <optional>
The color to apply (RGB/CMYK/SPOT)
percentage number <optional>
A number between 0 and 1 representing the intensity of the color overlay
saturation number <optional>
A number between -1 and 1 representing the saturation to apply to the masked image
shadow Object <optional>
Update an existing shadow on matching text elements
Properties
Name Type Attributes Description
color string <optional>
The color to apply (RGB/CMYK/SPOT)
color_overlay Object <optional>
A color overlay to apply to any matching image elements
Properties
Name Type Attributes Description
color string <optional>
The color to apply (RGB/CMYK/SPOT)
percentage number <optional>
A number between 0 and 1 representing the intensity of the color overlay
saturation number <optional>
A number between -1 and 1 representing the saturation to apply to the new image set via the "url" property or existing matching image elements
An object containing data to populate a matched element. Read full documentation here
Type:
  • Object

TemplateCustomizationObjectReplacements

Description:
Source:
Tutorials:
Properties:
Name Type Attributes Description
color Object.<string, string> <optional>
Update any instances of the matched color with the new color (RGB/CMYK/SPOT)
text Object.<string, string> <optional>
Update any text elements with the fully matched text with the replacement text
text_substring Object.<string, string> <optional>
Update any text (token) found within text elements with the replacement text
An object containing data to replace matched element properties. Read full documentation here
Type:
  • Object