Skip to content

pantoken / formats/interactions/src / initInPlaceEdit

फंक्शन: initInPlaceEdit()

initInPlaceEdit(host, dispatchOn): void

क्लिक-टू-एडिट कमिट/रिवर्ट व्यवहार के लिए एक contenteditable फील्ड कनेक्ट करें. Enter कमिट करता है, Escape रिवर्ट करता है; blur भी कमिट करता है यदि मान बदला हो. कमिट पर change CustomEvent को detail.value के साथ ट्रिगर करता है (बबलिंग)।

CSS: host = .instui-in-place-edit तत्व (जो contenteditable है) WC: host = shadow .instui-in-place-edit span

पैरामीटर

host

HTMLElement

dispatchOn

HTMLElement

वापसी

void