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/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

options? ​

InPlaceEditOptions = {}

Renvoie ​

void