midoriInlineEdit
midoriInlineEdit lets you turn anything on the page into a text box. The changes made by the user is saved and passed to your callback function.
-
midoriInlineEdit(vars)Creates an inline edit object.Accepts the following parameters:
- id is the id of the element that will be turned into a text box.
- size is the size of the text box.
- maxlen is the maximum length of characters that can be entered in the text box.
- callback is the optional callback function that will be called after the user has finished editing. The edited content will be passed to this function.
var name = new midoriInlineEdit( { id: 'name', size: 40, maxlen: 80 } ); - id is the id of the element that will be turned into a text box.
-
edit()Activates the editing mode.Example:John Smith
// Assuming name is an inline edit object, // clicking on the text will edit it <div id="name" onclick="name.edit()">John Smith</div>
