PluginProbe
Extendify / 3.1.5
Extendify v3.1.5
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / QuickEdit / lib / quick-edit-handlers.js

quick-edit-handlers.js in Extendify 3.1.5, at src/QuickEdit/lib/quick-edit-handlers.js

33 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Single source of truth for "does Quick Edit have an editor for this
2 // blockType?" — hover-bar uses it to gate the Quick Edit pill, and
3 // keyboard-entry uses it to skip opening an editor for blocks that
4 // only get Ask AI. InlineEditor still owns the actual handler routing;
5 // if a type is in this set but InlineEditor has no branch, the user
6 // sees UnsupportedNotice (self-healing safety net).
7 //
8 // Keep aligned with TEXT_STRATEGIES + PICKER_STRATEGIES +
9 // MODAL_BLOCK_TYPES in components/InlineEditor.jsx.
10 export const QUICK_EDIT_BLOCK_TYPES = new Set([
11 'core/paragraph',
12 'core/heading',
13 'core/button',
14 'core/image',
15 'core/cover',
16 'core/media-text:image',
17 'product:image',
18 'core/site-title',
19 'core/site-tagline',
20 'core/site-logo',
21 'core/social-link',
22 'core/navigation-link',
23 'core/navigation-submenu',
24 'product:name',
25 'product:short_description',
26 'product:description',
27 'product:price',
28 'wpforms:field',
29 ]);
30
31 export const hasQuickEditModalFor = (blockType) =>
32 !!blockType && QUICK_EDIT_BLOCK_TYPES.has(blockType);
33