Meet us at SGIA Expo. Las Vegas, NV. Oct. 18—19.

ITextConfig Interface

A structure defining the text parameters.

You can apply these parameters to the text object through either clientConfig.json or IConfiguration.

example
{
    "defaultItemsConfig": {
        "text": {
            "font": {
                "postScriptName": "Impact",
                "size": 33,
                "fauxBold": true,
                "fauxItalic": true
            },
            "color": "rgb(30,30,30)",
            "shadow": {
                "color": "rgb(255,0,0)",
                "size": 0.4,
                "angle": 45,
                "distance": 2
            },
            "stroke": {
                "size": 0.3
            },
            "overflowStrategy": "FitToWidth",
            "textPermissions": {
                "allowChangeFontColor": false,
                "allowChangeShadow": false,
                "allowChangeStroke": false
            }
        }
    }
}

Properties

Optional alignment

alignment: TextAlignment

The text alignment.

Optional angle

angle: number

An angle, which design elements are rotated to. By default, this value is 0.

Optional borderColor

borderColor: string

The shape border color. The default value is "rgba(0,0,0,255)".

Optional borderWidth

borderWidth: number

The shape border width, in points. The default value is 1.

Optional characterLimit

characterLimit: number

Limits the number of characters that the user can enter in the Rich text editor. By default, this number is not limited.

Optional color

color: string

The text color. The default value is "rgba(0,0,0,255)".

Optional fillColor

fillColor: string

The fill color. The default value is "rgba(0, 0, 0, 0)".

Optional font

The font parameters.

Optional horizontalScale

horizontalScale: number

Allows you to scale text horizontally. The default value is 1.

Optional isVariable

isVariable: boolean

Marks a design element as a variable item. The default value is false.

Optional isVertical

isVertical: boolean

Enables the vertical orientation of bounded text. The default value is false.

Optional itemPermissions

itemPermissions: IItemPermissionsConfig

A structure defining the Item Menu for design elements.

Optional leading

leading: number

The spacing between base lines, in points.

Optional location

The location of design elements being added to the canvas. By default, you can add them to the center of your product.

Optional manipulationPermissions

manipulationPermissions: IManipulationPermissionsConfig

A structure defining the manipulation permissions for design elements.

Optional maskOpacity

maskOpacity: number

The mask opacity of an item. The default value is 0.45.

Optional maxLineCount

maxLineCount: number

The maximum number of lines which the user is allowed to enter into a specific point text or bounded text element. By default, this number is not limited.

Optional maxLineLength

maxLineLength: number

The maximum length of text lines which the user is allowed to enter into a specific point text or bounded text element. By default, this number is not limited.

Optional name

name: string

The name of design elements being added to the canvas.

Optional opacity

opacity: number

An opacity applied to design elements. This value can be from 0 to 1. By default, it is 1.

Optional overflowStrategy

overflowStrategy: OverflowStrategy

The copyfitting strategy applied to a bounded text element when it overflows. By default, this property is "clip".

Optional paragraphSettings

paragraphSettings: IParagraphSettingsConfig

The default parameters of paragraphs.

Optional shadow

The shadow parameters.

Optional shapePermissions

shapePermissions: IShapePermissionsConfig

Defines permissions for shapes.

Optional stroke

The stroke parameters.

Optional text

text: string

The default content for new text elements. It is an empty string for text with rich formatting and "Text" for plain text.

Optional textPermissions

textPermissions: ITextPermissionsConfig

Defines permissions for new text elements.

Optional textShrinkMode

textShrinkMode: ShrinkMode

A mode defining how a bounded text element shrinks to its bounds when it overflows. By default, this property is "size".

Optional textWrappingMode

textWrappingMode: WrappingModeType

A wrapping mode applied to wrap text around design elements. By default, it is "none".

Optional tracking

tracking: number

The spacing between characters, in points. The default value is 0.

Optional underline

underline: boolean

Enables the underline. The default value is false.

Optional verticalAlignment

verticalAlignment: VerticalAlignmentType

Defines how the vertical bounded text is aligned. The default value is "top".

Optional verticalScale

verticalScale: number

Allows you to scale text vertically. The default value is 1.

Optional visualizationPermissions

visualizationPermissions: IVisualizationPermissionsConfig

A structure defining the visualization permissions for design elements.

Optional wrappingMargin

wrappingMargin: number

The spacing between an item and wrapping text, in points. The default value is 7.