Utilities for the HybridForms API

Hierarchy

  • Utilities

Constructors

Methods

  • Copy given value to system clipboard

    Parameters

    • value: string

      string

    • Optional copyContext: HTMLElement

      HTMLElement, parent wrapper of the input to copy

    • Optional tooltipEl: HTMLElement

      HTMLElement, element to display the tooltip

    Returns void

  • Decodes a given HTML string.

    Returns

    decoded HTML string

    Parameters

    • html: string

    Returns string

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

    Parameters

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

    Returns void

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

    Returns

    Returns the resolved value.

    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

  • 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.

    Returns

    A promise of type ICounterResponse

    Parameters

    • counterId: string

      The id of the counter you want to request.

    • Optional counterData: ICounterData

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

    Returns Promise<ICounterResponse>

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

    Returns

    clean HTML string

    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

  • Returns a JSZip node module instance for working with ZIPs

    Parameters

    • Optional input: string
    • Optional width: number
    • Optional height: number

    Returns any

Generated using TypeDoc