{editable:item_id:field_id:placeholder}

Description

Renders the value of one field as an inline, in-place editor on the public page so a logged-in editor can change the content directly where it is shown, without opening the admin item form. The field value is wrapped in an HTML element with the attribute contenteditable=true: a div for multiline text fields (full text, textarea, HTML editor), a span for single-line fields. AA also loads the CKEditor rich-text editor and a Save changes toolbar button, so edits are written back to the item. With no item_id the current item in context is used. An optional placeholder shows when the field is empty. The command returns an empty string when no field_id is given, when the item cannot be found, or when the field does not exist on the slice. Because the markup carries live item and field ids and pulls in the editor scripts, the output is install and item specific - useful inside a slice or view template, not as a fixed value.

Parameters

item_id optional default (current item)

Long (32-character) id of the item whose field you want to edit inline. Leave it empty to use the current item being rendered by the slice or view template - the usual case.

field_id required default (none)

Field id of the field to make editable, for example headline........ or full_text........ The element becomes a div for multiline fields and a span for single-line fields. With no field_id the command returns an empty string.

placeholder optional default (empty)

Text shown in the editable element while the field is empty, to prompt the editor. If omitted, the element shows nothing for an empty value (for a translated field it defaults to the language code in brackets).

Examples

virtual{editable:a65d19971986e750761f0efcd9a16b1b:full_text........:Add details here}
Expected(an inline editable div for the named items full_text field, showing Add details here while empty)
Naming an explicit item_id edits that specific item rather than the current one. A multiline field (full text, textarea, HTML editor) renders as a div. The third argument is a placeholder shown only while the field is empty. Output is live editor markup, so this example is illustrative, not asserted.
test[{editable::}]
Expected[]
Actual[]
An empty field_id (the first segment is the item_id, here also empty) yields no editor and an empty result. Always pass a real field_id.
virtual{editable:5726c2c6b035d7aab450d1794e9e90d7:headline........}
Expected(an inline editable span holding the items headline value Gamma, wired to CKEditor)
ActualGamma
A single-line field renders as a span with contenteditable=true; the field value sits inside it and a Save changes button appears once you start editing. Leave the first segment empty (item_id) to edit the current item instead of naming one. Output is live editor markup, so this example is illustrative, not asserted.
test[{editable:}]
Expected[]
Actual[]
With no field_id the command produces no output at all - it is a safe no-op, not an error. The brackets are only there to show the result is empty.
test[{editable:0badid00000000000000000000000000:headline........}]
Expected[]
Actual[]
If the item_id does not match a real item, there is nothing to edit and the output is empty. The same happens when the field does not exist on the slice.