WidgetType
Unofficial
Import:
import type { WidgetType } from '@codemirror/view';Signature:
export interface WidgetTypeMethods
| Method | Returns | Description | |
|---|---|---|---|
| become(dom, widget) | void | Called when a previous DOM element created by a widget of the same type is about to be reused. Equivalent to updateDOM, but for when eq returns true.Can be used as widget ownership transfer. | |
| coordsAt(dom, pos, side) | null | Rect | Override the way screen coordinates for positions at/in the widget are found. | |
| destroy(dom) | void | This is called when an instance of the widget is removed from the editor view. | |
| ignoreEvent(event) | boolean | Can be used to configure which kinds of events inside the widget should be ignored by the editor. The default is to ignore all events. |
Links to this page: