Options
All
  • Public
  • Public/Protected
  • All
Menu

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text. This contains a few more utility methods for updating or removing autosize.

Index

Type Aliases

Functions

Type Aliases

ElementOrElements: Element | ArrayLike<Element>

An element or a list of elements accepted by the autosize functions.

Functions

  • destroy<TElement>(element: TElement): TElement
  • Removes Autosize and reverts any changes it made to the TEXTAREA element.

    Type Parameters

    Parameters

    • element: TElement

      The TEXTAREA element to which autosize is attached.

    Returns TElement

  • update<TElement>(element: TElement): TElement
  • Triggers the height adjustment for an assigned textarea element.

    Autosize will automatically adjust the textarea height on keyboard and window resize events.

    There is no efficient way for Autosize to monitor for when another script has changed the TEXTAREA value or for changes in layout that impact the textarea element.

    Type Parameters

    Parameters

    • element: TElement

      The TEXTAREA element to which autosize is attaached.

    Returns TElement

Generated using TypeDoc