API Docs for: 1.0.0
Show:

Node~utils Class

Augments Y.Node with useful functions.

Methods

adjustTextareaHeight

(
  • textarea
)
static

Adjusts the height of a textarea to fit the text.

Parameters:

  • textarea Node

    textarea to adjust

selectAllText

()

Selects all of the text in a text input or textarea.

selectRange

(
  • start
  • length
)

Selects part of the text in a text input or textarea.

Parameters:

  • start Number

    the start of the selection

  • length Number

    the length of the selection

setCaretPosition

(
  • pos
)

Positions the caret inside a text input or textarea.

Parameters:

  • pos Number

    the location of the caret

Properties

max_textarea_height

Number static

Maximum height in pixels allowed for Y.Node.adjustTextareaHeight().