Skip to content

pantoken / formats/interactions/src / initInPlaceEdit

Funzione: initInPlaceEdit()

initInPlaceEdit(host, dispatchOn): void

Collega un campo contenteditable per il comportamento click-to-edit di commit/revert. Invio esegue il commit, Escape annulla; anche il blur esegue il commit se il valore è cambiato. Emette un change CustomEvent che si propaga con detail.value al commit.

CSS: host = .instui-in-place-edit elemento (che È contenteditable) WC: host = shadow .instui-in-place-edit span

Parametri

host

HTMLElement

dispatchOn

HTMLElement

Restituisce

void