Skip to content

pantoken-root / formats/interactions/src / initInPlaceEdit

Función: initInPlaceEdit() ​

initInPlaceEdit(host, dispatchOn, options?): void

Conectar un campo contenteditable para el comportamiento de hacer clic-para-editar con confirmar/revertir. Enter confirma, Escape revierte; blur también confirma si el valor cambió. Dispara un change CustomEvent que burbujea con detail.value al confirmar.

CSS: host = .instui-in-place-edit elemento (que SÍ es contenteditable) WC: host = shadow .instui-in-place-edit span

Parámetros ​

host ​

HTMLElement

dispatchOn ​

HTMLElement

options? ​

InPlaceEditOptions = {}

Devuelve ​

void