Skip to content

pantoken-root / formats/interactions/src / initInPlaceEdit

פונקציה: initInPlaceEdit() ​

initInPlaceEdit(host, dispatchOn, options?): 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

options? ​

InPlaceEditOptions = {}

מחזיר ​

void