Skip to content

pantoken-root / formats/interactions/src / initInPlaceEdit

Function: initInPlaceEdit() ​

initInPlaceEdit(host, dispatchOn, options?): void

Wire a contenteditable field for click-to-edit commit/revert behaviour. Enter commits, Escape reverts; blur also commits if the value changed. Fires a bubbling change CustomEvent with detail.value on commit. The optional input type configures the editing hint only; consumers validate committed values.

CSS: host = .instui-in-place-edit element (which IS contenteditable) WC: host = shadow .instui-in-place-edit span

Parameters ​

host ​

HTMLElement

dispatchOn ​

HTMLElement

options? ​

InPlaceEditOptions = {}

Returns ​

void