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