# Module `RichInput`

Druid Rich Input custom component.

It's wrapper on Input component with cursor and placeholder text

## Functions

get_text(self) | GSet input field text
init(self, template, nodes) | The RichInput constructor
set_allowed_characters(self, characters) | Set allowed charaters for input field.
set_placeholder(self, placeholder_text) | Set placeholder text

## Fields

cursor | On input field text change to empty string callback(self, input_text)
druid | The component druid instance
input | On input field text change callback(self, input_text)
placeholder | On input field text change to max length string callback(self, input_text)
root | Root node

## Functions

get_text(self)
  GSet input field text

  ### Parameters:

  - self RichInput RichInput

  ### Returns:

  string Current input text
init(self, template, nodes)
  The RichInput constructor

  ### Parameters:

  - self RichInput RichInput
  - template string The template string name
  - nodes table Nodes table from gui.clone_tree
set_allowed_characters(self, characters)
  Set allowed charaters for input field. See: https://defold.com/ref/stable/string/ ex: [%a%d] for alpha and numeric

  ### Parameters:

  - self RichInput RichInput
  - characters string Regulax exp. for validate user input

  ### Returns:

  RichInput Current instance
set_placeholder(self, placeholder_text)
  Set placeholder text

  ### Parameters:

  - self RichInput RichInput
  - placeholder_text string or nil The placeholder text

  ### Returns:

  RichInput Current instance

## Fields

cursor
  On input field text change to empty string callback(self, input_text)
  - cursor node
druid
  The component druid instance
  - druid DruidInstance DruidInstance
input
  On input field text change callback(self, input_text)
  - input Input Input
placeholder
  On input field text change to max length string callback(self, input_text)
  - placeholder druid.text Text
root
  Root node
  - root node

generated by LDoc TESTING Last updated 2015-01-01 12:00:00