Skip to content

pantoken-root / formats/interactions/src / initInPlaceEdit

Funkcija: initInPlaceEdit() ​

initInPlaceEdit(host, dispatchOn, options?): void

Poveži polje contenteditable za vedenje klik-za-urejanje — potrditev/preklic. Enter potrdi, Escape prekliče; izguba fokusa (blur) prav tako potrdi, če se je vrednost spremenila. Ob potrditvi sproži mehurčkajoč change CustomEvent z detail.value.

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

Parametri ​

host ​

HTMLElement

dispatchOn ​

HTMLElement

options? ​

InPlaceEditOptions = {}

Vrne ​

void