Skip to content

pantoken-root / formats/interactions/src / initInPlaceEdit

Fonction: initInPlaceEdit() ​

initInPlaceEdit(host, dispatchOn, options?): void

Connecte un champ contenteditable pour le comportement cliquer‑pour‑éditer (commit/annulation). Entrée valide (commit), Échap annule ; le blur valide aussi si la valeur a changé. Déclenche un change CustomEvent qui remonte avec detail.value lors du commit.

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

Paramètres ​

host ​

HTMLElement

dispatchOn ​

HTMLElement

options? ​

InPlaceEditOptions = {}

Retourne ​

void