Skip to content

pantoken / formats/interactions/src / initInPlaceEdit

Fonction: initInPlaceEdit()

initInPlaceEdit(host, dispatchOn): void

Connecte un champ contenteditable pour le comportement cliquer-pour-éditer (commit/annuler). Entrée effectue le commit, Échap annule ; le blur effectue aussi le commit 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 (qui EST contenteditable) WC: host = shadow .instui-in-place-edit span

Paramètres

host

HTMLElement

dispatchOn

HTMLElement

Renvoie

void