Show:

Q inplace Class

This tool generates an inline editor, along with a form tag.

Constructor

Q inplace

(
  • [$options]
)

Parameters:

  • [$options] Array optional

    An associative array of parameters, containing:

    • fieldInput String

      Required. HTML representing a text input, textarea, or select.

    • staticHtml String

      Required. The static HTML to display when the input isn't showing.

    • [type='textarea'] String optional

      The type of the input. Can be "textarea", "text" or "select"

    • [action=""] String optional

      The uri or url to submit to

    • [method="put"] String optional

      The method to use for submitting the form.

    • [editing] Boolean optional

      If true, then renders the inplace tool in editing mode.

    • [editOnClick=true] Boolean optional

      If true, then edit mode starts only if "Edit" button is clicked.

    • [selectOnEdit=true] Boolean optional

      If true, selects all the text when entering edit mode.

    • [placeholder] String optional

      Text to show in the staticHtml or input field when the editor is empty

    • [hidden] Array optional

      An associative array of additional hidden fields to submit in the form

    • [maxWidth] Integer optional

      The maximum width for the Q/autogrow

    • [beforeSave] String optional

      Reference to a callback to call after a successful save. This callback can cancel the save by returning false.

    • [onSave] String optional

      Reference to a callback or event to run after a successful save.

    • [onCancel] String optional

      Reference to a callback or event to run after cancel.

Item Index