# vim: ts=3 sw=3 et ft=org
#+TITLE: In-Place Textarea Element
#+STYLE: <LINK href='../stylesheet.css' rel='stylesheet' type='text/css' />
#+AUTHOR: Rusty Klophaus (@rustyio)
#+OPTIONS:   H:2 num:1 toc:1 \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+EMAIL: 
#+TEXT: [[file:../index.org][Getting Started]] | [[file:../api.org][API]] | [[file:../elements.org][*Elements*]] | [[file:../actions.org][Actions]] | [[file:../validators.org][Validators]] | [[file:../handlers.org][Handlers]] | [[file:../config.org][Configuration Options]] | [[file:../about.org][About]]

* In-Place Textarea Element - #inplace_textarea {}

  The inplace\_textarea element creates a textarea that the user can
  edit in place.

  The user clicks on the label, and it is replaced with a textarea, an OK button, and a
  Cancel button. 

  If the user clicks OK, a callback is issued to the delegate module
  so that it can save the new text.

** Usage

#+BEGIN_SRC erlang
   #inplace_textarea { id=textarea1, text="Some text." }
#+END_SRC

** Attributes

   + text - (/string/) :: Set the textarea's contents.

   + html\_encode - (/boolean/) :: Set to true to safely html-encode the text.

   + start\_mode - (/Atom, 'edit' or 'view'/) :: Set whether the textarea should start in edit mode or view mode.

   + validators - (/Validator, or list of validators./) :: Validators to apply to the textarea.

   + tag - (/Erlang term/) :: See the delegate attribute for details.

** Callbacks

*** inplace\_textarea_event(Tag, Value)

    Called when the user presses the OK button. Tag is specified in
    the 'tag' attribute, above.  Value is the current value of the
    textarea. This callback function should process the value as
    necessary, and must return either the value itself, or a new value
    that will be sent back to the page and set as the value of the
    textarea.

** See Also

   + [[./base.html][base element]]

   + [[./inplace_textbox.html][inplace_textbox element]]

   + [[./inplace.html][inplace element]]

   + [[./textarea.html][textarea element]]

 
