7.1.2.12 editor
editor(string $id, string $url, array $options)
Creates an in-place editor at DOM id. The supplied $url should be an action that is responsible for saving element data. For more information and demos see http://github.com/madrobby/scriptaculous/wikis/ajax-inplaceeditor.
Common options might include:
| $options keys | Description |
|---|---|
|
Activate the 'collection' mode of in-place editing. $options['collection'] takes an array which is turned into options for the select. To learn more about collection see http://github.com/madrobby/scriptaculous/wikis/ajax-inplacecollectioneditor. |
|
A function to execute before the request is sent to the server. This can be used to format the information sent to the server. The signature is |
|
Text of the submit button in edit mode |
|
The text of the link that cancels editing |
|
The text shown while the text is sent to the server |
|
|
|
|
|
The row height of the input field |
|
The number of columns the text area should span |
|
Synonym for ‘cols’ when using single-line |
|
The highlight color |
|
The color which the highlight fades to |
|
|
|
|
|
|
|
Example
<div id="in_place_editor_id">Text To Edit</div>
<?php
echo $ajax->editor(
"in_place_editor_id",
array(
'controller' => 'Posts',
'action' => 'update_title',
$id
),
array()
);
?>
<div id="in_place_editor_id">Text To Edit</div><?phpecho $ajax->editor("in_place_editor_id",array('controller' => 'Posts','action' => 'update_title',$id),array());?>


























