MCPcopy Create free account
hub / github.com/editablejs/editable / Editable

Interface Editable

packages/editor/src/plugin/editable.ts:133–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 * A React and DOM-specific version of the `Editor` interface.
132 */
133export interface Editable extends Editor {
134 blur(): void
135 focus(start?: boolean): void
136 copy(range?: Range): void
137 cut(range?: Range): void
138 selectWord: (options?: SelectWordOptions) => void
139 selectLine: (options?: SelectWordOptions) => void
140 insertFromClipboard(at?: Range): void
141 insertTextFromClipboard(at?: Range): void
142 insertFile(file: File, at?: Range): void
143 on: <T extends EventType>(type: T, handler: EventHandler<T>, prepend?: boolean) => void
144 once: <T extends EventType>(type: T, handler: EventHandler<T>, prepend?: boolean) => void
145 off: <T extends EventType>(type: T, handler: EventHandler<T>) => void
146 emit: <T extends EventType>(type: T, ...args: Parameters<EventHandler<T>>) => void
147 onKeydown: (event: KeyboardEvent) => void
148 onKeyup: (event: KeyboardEvent) => void
149 onFocus: () => void
150 onBlur: () => void
151 onPaste: (event: ClipboardEvent) => void
152 onCut: (event: ClipboardEvent) => void
153 onCopy: (event: ClipboardEvent) => void
154 onInput: (value: string) => void
155 onBeforeInput: (value: string) => void
156 onCompositionStart: (value: string) => void
157 onCompositionEnd: (value: string) => void
158 onSelectStart: () => void
159 onSelecting: () => void
160 onSelectEnd: () => void
161 onSelectionChange: () => void
162 onTouchHold: (event: TouchEvent) => void
163 onTouchTrack: () => void
164 onContextMenu: (event: MouseEvent) => void
165 onDestory: () => void
166 renderElementAttributes: (props: RenderElementAttributes) => ElementAttributes
167 renderLeafAttributes: (props: RenderLeafAttributes) => TextAttributes
168 renderElement: (props: RenderElementProps) => JSX.Element
169 renderLeaf: (props: RenderLeafProps) => JSX.Element
170 renderPlaceholder: (props: RenderPlaceholderProps) => JSX.Element | void | null
171 toDataTransfer: (range?: Range) => DataTransfer | null
172}
173
174export const Editable = {
175 isEditor(value: any): value is Editable {

Callers 21

blurFunction · 0.80
withEditableFunction · 0.80
deselectCurrentFunction · 0.80
focusFunction · 0.80
withKeydownFunction · 0.80
withEditableFunction · 0.80
handleSelectingFunction · 0.80
handleDocumentMouseUpFunction · 0.80
InputComponentFunction · 0.80
deselectCurrentFunction · 0.80
withKeydownFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…