Show:

Q inplace Class

Inplace text editor tool

Constructor

Q inplace

(
  • [options]
)

Parameters:

  • [options] Object optional

    This is an object of parameters for this function

    • action String

      Required url of the action to issue the request to on save.

    • [method='put'] String optional

      The HTTP verb to use.

    • [type='textarea'] String optional

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

    • [options={}] String optional

      If the type is "select", then this would be an object of {value: optionTitle} pairs

    • [editing] Boolean=true optional

      Whether to start out in editing mode

    • [editOnClick] Boolean=true optional

      Whether to enter editing mode when clicking on the text.

    • [selectOnEdit=true] Boolean optional

      Whether to select everything in the input field when entering edit mode.

    • [showEditButtons=false] Boolean=true optional

      Set to true to force showing the edit buttons on touchscreens

    • [maxWidth=null] Number optional

      The maximum width that the field can grow to

    • [minWidth=100] Number optional

      The minimum width that the field can shrink to

    • [staticHtml] String optional

      The static HTML to start out with

    • [placeholder=null] String optional

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

    • [template] Object optional

      Can be used to override info for the tool's view template.

      • [dir='{{Q}}/views'] String optional
      • [name='Q/inplace/tool'] String optional
    • [beforeSave] Q.Event optional

      This event triggers before save

    • [onSave] Q.Event optional

      This event triggers after save

    • [onCancel] Q.Event optional

      This event triggers after canceling

Item Index

Methods

hideActions

()

Hide Q/actions, if any

restoreActions

()

Restore Q/actions, if any