MCPcopy
hub / github.com/udecode/plate / withInlineVoid

Function withInlineVoid

packages/slate/src/utils/deleteMerge.spec.tsx:12–20  ·  view source on GitHub ↗
(editor: Editor & LegacyEditorMethods)

Source from the content-addressed store, hash-verified

10jsxt;
11
12const withInlineVoid = (editor: Editor & LegacyEditorMethods) => {
13 const { isInline, isVoid } = editor;
14
15 editor.isInline = (element) => element.type === 'img' || isInline(element);
16 editor.isVoid = (element) => element.type === 'img' || isVoid(element);
17 syncLegacyMethods(editor);
18
19 return editor;
20};
21
22describe('deleteMerge', () => {
23 it('returns early when there is no selection and no explicit location', () => {

Callers 1

Calls 3

syncLegacyMethodsFunction · 0.90
isInlineFunction · 0.85
isVoidFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…