HybridForms API
    Preparing search index...

    Class Utilities

    Utilities for the HybridForms API

    Index

    Constructors

    Methods

    • Copy given value to system clipboard

      Parameters

      • value: string

        string

      • OptionalcopyContext: HTMLElement

        HTMLElement, parent wrapper of the input to copy

      • OptionaltooltipEl: HTMLElement

        HTMLElement, element to display the tooltip

      Returns void

    • Decodes a given HTML string.

      Parameters

      • html: string

      Returns string

      decoded HTML string

    • Fill out multiple form fields by given form data object.

      Parameters

      • formData: { [key: string]: string | number | boolean }

      Returns void

    • Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.

      Parameters

      • object: any

        The object to query.

      • path: string

        The path of the property to get.

      • defaultValue: any = undefined

        The value returned for undefined resolved values.

      Returns any

      Returns the resolved value.

    • Generates a guid.

      Returns string

    • Checks if a variable has a value.

      Parameters

      • value: any

      Returns boolean

    • Return a counter value for a defined counter id. The counter must be registered and activated at the server.

      Parameters

      • counterId: string

        The id of the counter you want to request.

      • OptionalcounterData: ICounterData

        This is the data that you want to send to request the counter.

      Returns Promise<ICounterResponse>

      A promise of type ICounterResponse

    • Sanitize HTML input to prevent XSS attacks. Supports hf-img tag from HtmlContainer

      Parameters

      • value: string | Node

        HTML string or Node to sanitize

      • options: Config & { RETURN_DOM?: false; RETURN_DOM_FRAGMENT?: false } = {}

        DOMPurify config to tweak sanitizing. https://github.com/cure53/DOMPurify

      Returns string

      clean HTML string

    • Returns a JSZip node module instance for working with ZIPs

      Parameters

      • Optionalinput: string
      • Optionalwidth: number
      • Optionalheight: number

      Returns any