Nutrient Web SDK
    Preparing search index...

    Type Alias ElectronicSignaturesConfiguration

    Defines specific configuration options related to the electronic signatures feature.

    NutrientViewer.load({
    electronicSignatures: {
    creationModes: [NutrientViewer.ElectronicSignatureCreationMode.IMAGE],
    fonts: [new NutrientViewer.Font("mycustomfont")]
    }
    });
    type ElectronicSignaturesConfiguration = {
        colorPresets?: Readonly<ColorPreset[]>;
        creationModes?: IElectronicSignatureCreationMode[];
        fonts?: Readonly<NutrientViewer.Font[]>;
        setDefaultTypeText?: ElectronicSignatureDefaultTextCallback | string;
    }
    Index

    Properties

    colorPresets?: Readonly<ColorPreset[]>

    Optionally set color presets to be used in the Electronic Signatures dialog.

    Setting custom color presets for the Type Electronic Signature UI

     NutrientViewer.load({
    electronicSignatures: {
    colorPresets: [
    {
    color: Color.RED,
    localization: {
    id: 'red',
    defaultMessage: 'Red',
    description: 'Red color',
    },
    },
    {
    color: Color.ORANGE,
    localization: {
    id: 'orange',
    defaultMessage: 'Orange',
    description: 'Orange color',
    },
    },
    {
    color: Color.YELLOW,
    localization: {
    id: 'yellow',
    defaultMessage: 'Yellow',
    description: 'Yellow color',
    },
    },
    ],
    }
    });
    creationModes?: IElectronicSignatureCreationMode[]

    Array of tabs that should be offered to users on the electronic signatures modal.

    Array of NutrientViewer.Font fonts that users can choose from when typing text for adding a new electronic signature.

    You can specify any additional font to use on a custom style sheet set via Configuration#styleSheets via @font-face CSS at-rule.

    When specifying the name of each NutrientViewer.Font record make sure that it matches the one specified on the style sheet.

    setDefaultTypeText?: ElectronicSignatureDefaultTextCallback | string

    Optionally set an initial default text for the Type Electronic Signature UI.

    The default placeholder will be shown if the callback does not return a non-empty string, or is not set to a non-empty string.

    Setting a default text for the Type Electronic Signature UI

     NutrientViewer.load({
    electronicSignatures: {
    setDefaultTypeText: () => "My default text"
    }
    });