Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
options
The options
parameter is an optional collection of name-value pairs that configure the Inline Edit components. The available options are described below, with the addition of a selector for identifying the editable elements. The default selector is defined as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
selectors: {
editables: ".inlineEditable"
}
|
...
Constructor
Code Block | ||||
---|---|---|---|---|
| ||||
fluid.InlineEdit(componentContainer, options);
|
Parameters
componentContainer
The componentContainer
parameter is a unique ID, jQuery object, or DOM element representing the component's container.
options
The options
parameter is an optional collection of name-value pairs that configure the Inline Edit component:
Name | Description | Values | Default | |||||||
---|---|---|---|---|---|---|---|---|---|---|
| Javascript object containing selectors for various fragments of the Inline Edit component. | The object can contain any subset of the following keys: |
| |||||||
| Javascript object containing CSS style names that will be applied to the Inline Edit component. | The object can contain any subset of the following keys: |
| |||||||
| Javascript object containing pixed values that will configure the size of the edit field. | The object can contain any subset of the following keys: |
| |||||||
| A function that will be called each time the Inline Edit component leaves edit mode. This function can be used to communicate changes in the field to the server, or to take any other action desired by the implementor. | a function |
| |||||||
| A function that creates the editable field based on the display text. This function is used if no edit container is provided in the markup. | a function | a function that creates the edit field based on the following template:
| |||||||
| Indicates whether or to automatically selected the editable text when the component switches into edit mode. | boolean | |
...
Functions
Code Block | ||||
---|---|---|---|---|
| ||||
fluid.InlineEdit.edit(); |
...