Skip to content

pantoken / formats/interactions/src / initInPlaceEdit

פונקציה: initInPlaceEdit()

initInPlaceEdit(host, dispatchOn): void

חיבור שדה contenteditable להתנהגות לחיצה-לעריכה עם אישור/בטל. Enter מאשר, Escape מבטל; איבוד פוקוס גם מאשר אם הערך השתנה. מפַעֵל CustomEvent מתפשט change עם detail.value בעת אישור.

CSS: host = .instui-in-place-edit element (שהוא contenteditable) WC: host = shadow .instui-in-place-edit span

פרמטרים

host

HTMLElement

dispatchOn

HTMLElement

מחזיר

void