Internationalisation
Bundled Plugins API
TextArea
UI Text Area.

API Overview

  • Functions - API calls offered directly by the extension
  • matches
  • Constructors - API calls which return an object, typically one that offers API methods
  • TextArea
  • Fields - Variables which can only be accessed from an object returned by a constructor
  • focused
  • value
  • Methods - API calls which can only be made on an object returned by a constructor
  • append
  • prepend

API Documentation

Functions

matches

Signature
cp.ui.TextArea.matches(element) -> boolean
Type
Function
Description
Checks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false

Constructors

TextArea

Signature
cp.ui.TextArea(parent, uiFinder) -> TextArea
Type
Constructor
Description
Creates a new TextArea instance.
Parameters
  • parent - The parent object.
  • uiFinder - A function which will return the hs._asm.axuielement when available.
Returns
  • A new TextArea object.

Fields

focused

Signature
cp.ui.TextArea.focused <cp.prop: boolean>
Type
Field
Description
Whether or not the Text Area if focused.

value

Signature
cp.ui.TextArea.value <cp.prop: string>
Type
Field
Description
The current value of the text field.

Methods

append

Signature
cp.ui.TextArea:append(moreText) -> string
Type
Method
Description
Appends moreText to the end of the current value, returning the combined text value. If no text is currently set, moreText becomes the value.
Parameters
  • moreText - The text to add.
Returns
  • The combined string value.

prepend

Signature
cp.ui.TextArea:prepend(moreText) -> string
Type
Method
Description
Appends moreText to the beginning of the current value, returning the combined text value. If no text is currently set, moreText becomes the value.
Parameters
  • moreText - The text to add.
Returns
  • The combined string value.
Last modified 1mo ago