Skip to content

pantoken-root / formats/interactions/src / initInPlaceEdit

फंक्शन: initInPlaceEdit() ​

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

options? ​

InPlaceEditOptions = {}

वापसी ​

void