@wordpress/block-editor 12.22.0 → 12.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +4 -0
- package/build/components/block-list/block.js +11 -3
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-mover/button.js +4 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +5 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-patterns-list/index.js +4 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +7 -3
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-switcher/index.js +4 -3
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +5 -4
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +18 -9
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +48 -8
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/index.js +14 -2
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js +9 -2
- package/build/components/global-styles/advanced-panel.js.map +1 -1
- package/build/components/global-styles/background-panel.js +444 -0
- package/build/components/global-styles/background-panel.js.map +1 -0
- package/build/components/global-styles/color-panel.js +2 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js +3 -0
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/hooks.js +1 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +13 -0
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +15 -14
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +2 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/iframe/index.js +9 -4
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build/components/inserter/library.js +2 -0
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/menu.js +8 -2
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/search-items.js +36 -15
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +11 -0
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/list-view/block-select-button.js +16 -0
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +1 -1
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/index.js +17 -2
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-list-view-collapse-items.js +47 -0
- package/build/components/list-view/use-list-view-collapse-items.js.map +1 -0
- package/build/components/rich-text/index.js +14 -11
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +17 -11
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +2 -2
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/with-deprecations.js +0 -3
- package/build/components/rich-text/with-deprecations.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +50 -36
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/use-block-display-information/index.js +4 -6
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/hooks/anchor.js +2 -2
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/background.js +70 -424
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/index.js +7 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use-zoom-out.js +47 -0
- package/build/hooks/use-zoom-out.js.map +1 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -1
- package/build/private-apis.js +6 -1
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +3 -1
- package/build/private-apis.native.js.map +1 -1
- package/build/store/private-actions.js +13 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-keys.js +2 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/store/private-selectors.js +24 -3
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +22 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +34 -32
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +7 -1
- package/build/store/utils.js.map +1 -1
- package/build/utils/transform-styles/index.js +2 -1
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/components/block-list/block.js +11 -3
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-mover/button.js +4 -1
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +5 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +4 -1
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +7 -3
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-switcher/index.js +4 -3
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +5 -4
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +18 -9
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +50 -10
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/index.js +14 -2
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +9 -2
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +430 -0
- package/build-module/components/global-styles/background-panel.js.map +1 -0
- package/build-module/components/global-styles/color-panel.js +2 -1
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +3 -0
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +1 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/index.js +1 -0
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +16 -15
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +1 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/iframe/index.js +9 -4
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build-module/components/inserter/library.js +2 -0
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/menu.js +8 -2
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/search-items.js +33 -15
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +11 -0
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +16 -0
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +1 -1
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/index.js +17 -2
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-list-view-collapse-items.js +40 -0
- package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -0
- package/build-module/components/rich-text/index.js +15 -12
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +16 -11
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +2 -2
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/with-deprecations.js +0 -3
- package/build-module/components/rich-text/with-deprecations.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +50 -36
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +5 -7
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/hooks/anchor.js +2 -2
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/background.js +67 -419
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +41 -0
- package/build-module/hooks/use-zoom-out.js.map +1 -0
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/private-apis.js +7 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +3 -1
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/private-actions.js +12 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-keys.js +1 -0
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/store/private-selectors.js +22 -4
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +21 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +35 -33
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +6 -1
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +2 -1
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +4 -1
- package/build-style/content.css +4 -1
- package/build-style/style-rtl.css +84 -79
- package/build-style/style.css +84 -79
- package/package.json +31 -31
- package/src/components/block-list/block.js +19 -3
- package/src/components/block-mover/button.js +4 -1
- package/src/components/block-mover/index.js +8 -1
- package/src/components/block-patterns-list/index.js +22 -17
- package/src/components/block-preview/style.scss +28 -0
- package/src/components/block-settings-menu/block-settings-dropdown.js +8 -2
- package/src/components/block-switcher/index.js +5 -3
- package/src/components/block-switcher/style.scss +1 -1
- package/src/components/block-toolbar/index.js +22 -19
- package/src/components/block-toolbar/shuffle.js +19 -13
- package/src/components/block-toolbar/style.scss +1 -1
- package/src/components/block-tools/block-selection-button.js +66 -9
- package/src/components/block-tools/index.js +18 -1
- package/src/components/button-block-appender/content.scss +5 -1
- package/src/components/default-block-appender/content.scss +2 -2
- package/src/components/global-styles/advanced-panel.js +8 -2
- package/src/components/global-styles/background-panel.js +591 -0
- package/src/components/global-styles/color-panel.js +2 -1
- package/src/components/global-styles/get-global-styles-changes.js +3 -0
- package/src/components/global-styles/hooks.js +1 -0
- package/src/components/global-styles/index.js +4 -0
- package/src/components/global-styles/style.scss +78 -1
- package/src/{hooks/test/background.js → components/global-styles/test/background-panel.js} +36 -1
- package/src/components/global-styles/test/get-global-styles-changes.js +22 -3
- package/src/components/global-styles/test/use-global-styles-output.js +9 -9
- package/src/components/global-styles/use-global-styles-output.js +27 -16
- package/src/components/global-styles/utils.js +1 -0
- package/src/components/iframe/index.js +19 -9
- package/src/components/inserter/block-patterns-tab/index.js +1 -0
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +5 -0
- package/src/components/inserter/library.js +4 -0
- package/src/components/inserter/menu.js +8 -1
- package/src/components/inserter/search-items.js +37 -15
- package/src/components/inserter/style.scss +6 -12
- package/src/components/keyboard-shortcuts/index.js +11 -0
- package/src/components/list-view/block-select-button.js +13 -1
- package/src/components/list-view/block.js +1 -1
- package/src/components/list-view/index.js +18 -1
- package/src/components/list-view/style.scss +4 -4
- package/src/components/list-view/use-list-view-collapse-items.js +33 -0
- package/src/components/rich-text/index.js +30 -13
- package/src/components/rich-text/index.native.js +14 -11
- package/src/components/rich-text/native/get-format-colors.native.js +1 -1
- package/src/components/rich-text/native/index.native.js +2 -2
- package/src/components/rich-text/with-deprecations.js +0 -3
- package/src/components/url-popover/image-url-input-ui.js +68 -51
- package/src/components/use-block-display-information/index.js +8 -10
- package/src/hooks/anchor.js +11 -9
- package/src/hooks/background.js +77 -538
- package/src/hooks/index.js +1 -0
- package/src/hooks/use-zoom-out.js +36 -0
- package/src/index.js +1 -0
- package/src/private-apis.js +13 -1
- package/src/private-apis.native.js +2 -0
- package/src/store/private-actions.js +12 -0
- package/src/store/private-keys.js +1 -0
- package/src/store/private-selectors.js +54 -27
- package/src/store/reducer.js +22 -0
- package/src/store/selectors.js +195 -180
- package/src/store/test/private-actions.js +10 -0
- package/src/store/test/private-selectors.js +13 -0
- package/src/store/test/reducer.js +26 -0
- package/src/store/test/selectors.js +90 -199
- package/src/store/utils.js +13 -0
- package/src/style.scss +0 -2
- package/src/utils/transform-styles/index.js +2 -1
- package/src/hooks/anchor.scss +0 -4
- package/src/hooks/background.scss +0 -75
|
@@ -132,6 +132,17 @@ function KeyboardShortcutsRegister() {
|
|
|
132
132
|
character: 'y',
|
|
133
133
|
},
|
|
134
134
|
} );
|
|
135
|
+
|
|
136
|
+
// List view shortcuts.
|
|
137
|
+
registerShortcut( {
|
|
138
|
+
name: 'core/block-editor/collapse-list-view',
|
|
139
|
+
category: 'list-view',
|
|
140
|
+
description: __( 'Collapse all other items.' ),
|
|
141
|
+
keyCombination: {
|
|
142
|
+
modifier: 'alt',
|
|
143
|
+
character: 'l',
|
|
144
|
+
},
|
|
145
|
+
} );
|
|
135
146
|
}, [ registerShortcut ] );
|
|
136
147
|
|
|
137
148
|
return null;
|
|
@@ -64,6 +64,7 @@ function ListViewBlockSelectButton(
|
|
|
64
64
|
getPreviousBlockClientId,
|
|
65
65
|
getBlockRootClientId,
|
|
66
66
|
getBlockOrder,
|
|
67
|
+
getBlockParents,
|
|
67
68
|
getBlocksByClientId,
|
|
68
69
|
canRemoveBlocks,
|
|
69
70
|
} = useSelect( blockEditorStore );
|
|
@@ -72,7 +73,7 @@ function ListViewBlockSelectButton(
|
|
|
72
73
|
const isMatch = useShortcutEventMatch();
|
|
73
74
|
const isSticky = blockInformation?.positionType === 'sticky';
|
|
74
75
|
const images = useListViewImages( { clientId, isExpanded } );
|
|
75
|
-
const { rootClientId } = useListViewContext();
|
|
76
|
+
const { collapseAll, expand, rootClientId } = useListViewContext();
|
|
76
77
|
|
|
77
78
|
const positionLabel = blockInformation?.positionLabel
|
|
78
79
|
? sprintf(
|
|
@@ -227,6 +228,17 @@ function ListViewBlockSelectButton(
|
|
|
227
228
|
blockClientIds[ blockClientIds.length - 1 ],
|
|
228
229
|
null
|
|
229
230
|
);
|
|
231
|
+
} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {
|
|
232
|
+
if ( event.defaultPrevented ) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
event.preventDefault();
|
|
236
|
+
const { firstBlockClientId } = getBlocksToUpdate();
|
|
237
|
+
const blockParents = getBlockParents( firstBlockClientId, false );
|
|
238
|
+
// Collapse all blocks.
|
|
239
|
+
collapseAll();
|
|
240
|
+
// Expand all parents of the current block.
|
|
241
|
+
expand( blockParents );
|
|
230
242
|
}
|
|
231
243
|
}
|
|
232
244
|
|
|
@@ -396,7 +396,7 @@ function ListViewBlock( {
|
|
|
396
396
|
clientIds={ dropdownClientIds }
|
|
397
397
|
block={ block }
|
|
398
398
|
icon={ moreVertical }
|
|
399
|
-
label={ __( '
|
|
399
|
+
label={ __( 'Options' ) }
|
|
400
400
|
popoverProps={ {
|
|
401
401
|
anchor: settingsPopoverAnchor, // Used to position the settings at the cursor on right-click.
|
|
402
402
|
} }
|
|
@@ -37,6 +37,7 @@ import ListViewDropIndicatorPreview from './drop-indicator';
|
|
|
37
37
|
import useBlockSelection from './use-block-selection';
|
|
38
38
|
import useListViewBlockIndexes from './use-list-view-block-indexes';
|
|
39
39
|
import useListViewClientIds from './use-list-view-client-ids';
|
|
40
|
+
import useListViewCollapseItems from './use-list-view-collapse-items';
|
|
40
41
|
import useListViewDropZone from './use-list-view-drop-zone';
|
|
41
42
|
import useListViewExpandSelectedItem from './use-list-view-expand-selected-item';
|
|
42
43
|
import { store as blockEditorStore } from '../../store';
|
|
@@ -45,6 +46,9 @@ import { focusListItem } from './utils';
|
|
|
45
46
|
import useClipboardHandler from './use-clipboard-handler';
|
|
46
47
|
|
|
47
48
|
const expanded = ( state, action ) => {
|
|
49
|
+
if ( action.type === 'clear' ) {
|
|
50
|
+
return {};
|
|
51
|
+
}
|
|
48
52
|
if ( Array.isArray( action.clientIds ) ) {
|
|
49
53
|
return {
|
|
50
54
|
...state,
|
|
@@ -194,7 +198,10 @@ function ListViewComponent(
|
|
|
194
198
|
if ( ! clientId ) {
|
|
195
199
|
return;
|
|
196
200
|
}
|
|
197
|
-
|
|
201
|
+
const clientIds = Array.isArray( clientId )
|
|
202
|
+
? clientId
|
|
203
|
+
: [ clientId ];
|
|
204
|
+
setExpandedState( { type: 'expand', clientIds } );
|
|
198
205
|
},
|
|
199
206
|
[ setExpandedState ]
|
|
200
207
|
);
|
|
@@ -207,6 +214,9 @@ function ListViewComponent(
|
|
|
207
214
|
},
|
|
208
215
|
[ setExpandedState ]
|
|
209
216
|
);
|
|
217
|
+
const collapseAll = useCallback( () => {
|
|
218
|
+
setExpandedState( { type: 'clear' } );
|
|
219
|
+
}, [ setExpandedState ] );
|
|
210
220
|
const expandRow = useCallback(
|
|
211
221
|
( row ) => {
|
|
212
222
|
expand( row?.dataset?.block );
|
|
@@ -232,6 +242,11 @@ function ListViewComponent(
|
|
|
232
242
|
[ updateBlockSelection ]
|
|
233
243
|
);
|
|
234
244
|
|
|
245
|
+
useListViewCollapseItems( {
|
|
246
|
+
collapseAll,
|
|
247
|
+
expand,
|
|
248
|
+
} );
|
|
249
|
+
|
|
235
250
|
const firstDraggedBlockClientId = draggedClientIds?.[ 0 ];
|
|
236
251
|
|
|
237
252
|
// Convert a blockDropTarget into indexes relative to the blocks in the list view.
|
|
@@ -282,6 +297,7 @@ function ListViewComponent(
|
|
|
282
297
|
expand,
|
|
283
298
|
firstDraggedBlockIndex,
|
|
284
299
|
collapse,
|
|
300
|
+
collapseAll,
|
|
285
301
|
BlockSettingsMenu,
|
|
286
302
|
listViewInstanceId: instanceId,
|
|
287
303
|
AdditionalBlockContent,
|
|
@@ -299,6 +315,7 @@ function ListViewComponent(
|
|
|
299
315
|
expand,
|
|
300
316
|
firstDraggedBlockIndex,
|
|
301
317
|
collapse,
|
|
318
|
+
collapseAll,
|
|
302
319
|
BlockSettingsMenu,
|
|
303
320
|
instanceId,
|
|
304
321
|
AdditionalBlockContent,
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
align-items: center;
|
|
213
213
|
width: 100%;
|
|
214
214
|
height: auto;
|
|
215
|
-
padding: ($grid-unit-15 * 0.5) $grid-unit-
|
|
215
|
+
padding: ($grid-unit-15 * 0.5) ($grid-unit-15 * 0.5) ($grid-unit-15 * 0.5) 0;
|
|
216
216
|
text-align: left;
|
|
217
217
|
border-radius: $radius-block-ui;
|
|
218
218
|
position: relative;
|
|
@@ -309,14 +309,14 @@
|
|
|
309
309
|
|
|
310
310
|
&,
|
|
311
311
|
.components-button.has-icon {
|
|
312
|
-
width:
|
|
313
|
-
min-width:
|
|
312
|
+
width: $button-size-small;
|
|
313
|
+
min-width: $button-size-small;
|
|
314
314
|
padding: 0;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
.block-editor-list-view-block__menu-cell {
|
|
319
|
-
padding-right: $grid-unit-
|
|
319
|
+
padding-right: $grid-unit-15 * 0.5; // 6px.
|
|
320
320
|
|
|
321
321
|
.components-button.has-icon {
|
|
322
322
|
height: 24px;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useEffect } from '@wordpress/element';
|
|
5
|
+
import { useSelect } from '@wordpress/data';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { store as blockEditorStore } from '../../store';
|
|
11
|
+
import { unlock } from '../../lock-unlock';
|
|
12
|
+
|
|
13
|
+
export default function useListViewCollapseItems( { collapseAll, expand } ) {
|
|
14
|
+
const { expandedBlock, getBlockParents } = useSelect( ( select ) => {
|
|
15
|
+
const { getBlockParents: _getBlockParents, getExpandedBlock } = unlock(
|
|
16
|
+
select( blockEditorStore )
|
|
17
|
+
);
|
|
18
|
+
return {
|
|
19
|
+
expandedBlock: getExpandedBlock(),
|
|
20
|
+
getBlockParents: _getBlockParents,
|
|
21
|
+
};
|
|
22
|
+
}, [] );
|
|
23
|
+
|
|
24
|
+
// Collapse all but the specified block when the expanded block client Id changes.
|
|
25
|
+
useEffect( () => {
|
|
26
|
+
if ( expandedBlock ) {
|
|
27
|
+
const blockParents = getBlockParents( expandedBlock, false );
|
|
28
|
+
// Collapse all blocks and expand the block's parents.
|
|
29
|
+
collapseAll();
|
|
30
|
+
expand( blockParents );
|
|
31
|
+
}
|
|
32
|
+
}, [ collapseAll, expand, expandedBlock, getBlockParents ] );
|
|
33
|
+
}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
createContext,
|
|
14
14
|
} from '@wordpress/element';
|
|
15
15
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
16
|
-
import { useMergeRefs } from '@wordpress/compose';
|
|
16
|
+
import { useMergeRefs, useInstanceId } from '@wordpress/compose';
|
|
17
17
|
import {
|
|
18
18
|
__unstableUseRichText as useRichText,
|
|
19
19
|
removeFormat,
|
|
@@ -52,6 +52,8 @@ import { canBindBlock } from '../../hooks/use-bindings-attributes';
|
|
|
52
52
|
export const keyboardShortcutContext = createContext();
|
|
53
53
|
export const inputEventContext = createContext();
|
|
54
54
|
|
|
55
|
+
const instanceIdKey = Symbol( 'instanceId' );
|
|
56
|
+
|
|
55
57
|
/**
|
|
56
58
|
* Removes props used for the native version of RichText so that they are not
|
|
57
59
|
* passed to the DOM element and log warnings.
|
|
@@ -75,7 +77,6 @@ function removeNativeProps( props ) {
|
|
|
75
77
|
fontStyle,
|
|
76
78
|
minWidth,
|
|
77
79
|
maxWidth,
|
|
78
|
-
setRef,
|
|
79
80
|
disableSuggestions,
|
|
80
81
|
disableAutocorrection,
|
|
81
82
|
...restProps
|
|
@@ -110,13 +111,15 @@ export function RichTextWrapper(
|
|
|
110
111
|
__unstableDisableFormats: disableFormats,
|
|
111
112
|
disableLineBreaks,
|
|
112
113
|
__unstableAllowPrefixTransformations,
|
|
113
|
-
|
|
114
|
+
readOnly,
|
|
114
115
|
...props
|
|
115
116
|
},
|
|
116
117
|
forwardedRef
|
|
117
118
|
) {
|
|
118
119
|
props = removeNativeProps( props );
|
|
119
120
|
|
|
121
|
+
const instanceId = useInstanceId( RichTextWrapper );
|
|
122
|
+
|
|
120
123
|
const anchorRef = useRef();
|
|
121
124
|
const context = useBlockEditContext();
|
|
122
125
|
const { clientId, isSelected: isBlockSelected, name: blockName } = context;
|
|
@@ -139,7 +142,9 @@ export function RichTextWrapper(
|
|
|
139
142
|
isSelected =
|
|
140
143
|
selectionStart.clientId === clientId &&
|
|
141
144
|
selectionEnd.clientId === clientId &&
|
|
142
|
-
|
|
145
|
+
( identifier
|
|
146
|
+
? selectionStart.attributeKey === identifier
|
|
147
|
+
: selectionStart[ instanceIdKey ] === instanceId );
|
|
143
148
|
} else if ( originalIsSelected ) {
|
|
144
149
|
isSelected = selectionStart.clientId === clientId;
|
|
145
150
|
}
|
|
@@ -153,6 +158,7 @@ export function RichTextWrapper(
|
|
|
153
158
|
const { selectionStart, selectionEnd, isSelected } = useSelect( selector, [
|
|
154
159
|
clientId,
|
|
155
160
|
identifier,
|
|
161
|
+
instanceId,
|
|
156
162
|
originalIsSelected,
|
|
157
163
|
isBlockSelected,
|
|
158
164
|
] );
|
|
@@ -196,7 +202,7 @@ export function RichTextWrapper(
|
|
|
196
202
|
[ blockBindings, blockName ]
|
|
197
203
|
);
|
|
198
204
|
|
|
199
|
-
const shouldDisableEditing =
|
|
205
|
+
const shouldDisableEditing = readOnly || disableBoundBlocks;
|
|
200
206
|
|
|
201
207
|
const { getSelectionStart, getSelectionEnd, getBlockRootClientId } =
|
|
202
208
|
useSelect( blockEditorStore );
|
|
@@ -213,6 +219,13 @@ export function RichTextWrapper(
|
|
|
213
219
|
const selection = {};
|
|
214
220
|
const unset = start === undefined && end === undefined;
|
|
215
221
|
|
|
222
|
+
const baseSelection = {
|
|
223
|
+
clientId,
|
|
224
|
+
[ identifier ? 'attributeKey' : instanceIdKey ]: identifier
|
|
225
|
+
? identifier
|
|
226
|
+
: instanceId,
|
|
227
|
+
};
|
|
228
|
+
|
|
216
229
|
if ( typeof start === 'number' || unset ) {
|
|
217
230
|
// If we are only setting the start (or the end below), which
|
|
218
231
|
// means a partial selection, and we're not updating a selection
|
|
@@ -227,8 +240,7 @@ export function RichTextWrapper(
|
|
|
227
240
|
}
|
|
228
241
|
|
|
229
242
|
selection.start = {
|
|
230
|
-
|
|
231
|
-
attributeKey: identifier,
|
|
243
|
+
...baseSelection,
|
|
232
244
|
offset: start,
|
|
233
245
|
};
|
|
234
246
|
}
|
|
@@ -243,15 +255,22 @@ export function RichTextWrapper(
|
|
|
243
255
|
}
|
|
244
256
|
|
|
245
257
|
selection.end = {
|
|
246
|
-
|
|
247
|
-
attributeKey: identifier,
|
|
258
|
+
...baseSelection,
|
|
248
259
|
offset: end,
|
|
249
260
|
};
|
|
250
261
|
}
|
|
251
262
|
|
|
252
263
|
selectionChange( selection );
|
|
253
264
|
},
|
|
254
|
-
[
|
|
265
|
+
[
|
|
266
|
+
clientId,
|
|
267
|
+
getBlockRootClientId,
|
|
268
|
+
getSelectionEnd,
|
|
269
|
+
getSelectionStart,
|
|
270
|
+
identifier,
|
|
271
|
+
instanceId,
|
|
272
|
+
selectionChange,
|
|
273
|
+
]
|
|
255
274
|
);
|
|
256
275
|
|
|
257
276
|
const {
|
|
@@ -466,9 +485,7 @@ PrivateRichText.isEmpty = ( value ) => {
|
|
|
466
485
|
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md
|
|
467
486
|
*/
|
|
468
487
|
const PublicForwardedRichTextContainer = forwardRef( ( props, ref ) => {
|
|
469
|
-
return
|
|
470
|
-
<PrivateRichText ref={ ref } { ...props } disableEditing={ false } />
|
|
471
|
-
);
|
|
488
|
+
return <PrivateRichText ref={ ref } { ...props } readOnly={ false } />;
|
|
472
489
|
} );
|
|
473
490
|
|
|
474
491
|
PublicForwardedRichTextContainer.Content = Content;
|
|
@@ -94,14 +94,13 @@ export function RichTextWrapper(
|
|
|
94
94
|
minWidth,
|
|
95
95
|
maxWidth,
|
|
96
96
|
onBlur,
|
|
97
|
-
setRef,
|
|
98
97
|
disableSuggestions,
|
|
99
98
|
disableAutocorrection,
|
|
100
99
|
containerWidth,
|
|
101
100
|
onEnter: onCustomEnter,
|
|
102
101
|
...props
|
|
103
102
|
},
|
|
104
|
-
|
|
103
|
+
providedRef
|
|
105
104
|
) {
|
|
106
105
|
const instanceId = useInstanceId( RichTextWrapper );
|
|
107
106
|
|
|
@@ -529,13 +528,13 @@ export function RichTextWrapper(
|
|
|
529
528
|
[ onReplace, __unstableMarkAutomaticChange ]
|
|
530
529
|
);
|
|
531
530
|
|
|
532
|
-
const mergedRef = useMergeRefs( [
|
|
531
|
+
const mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );
|
|
533
532
|
|
|
534
533
|
return (
|
|
535
534
|
<RichText
|
|
536
535
|
clientId={ clientId }
|
|
537
536
|
identifier={ identifier }
|
|
538
|
-
|
|
537
|
+
nativeEditorRef={ mergedRef }
|
|
539
538
|
value={ adjustedValue }
|
|
540
539
|
onChange={ adjustedOnChange }
|
|
541
540
|
selectionStart={ selectionStart }
|
|
@@ -586,7 +585,6 @@ export function RichTextWrapper(
|
|
|
586
585
|
minWidth={ minWidth }
|
|
587
586
|
maxWidth={ maxWidth }
|
|
588
587
|
onBlur={ onBlur }
|
|
589
|
-
setRef={ setRef }
|
|
590
588
|
disableSuggestions={ disableSuggestions }
|
|
591
589
|
disableAutocorrection={ disableAutocorrection }
|
|
592
590
|
containerWidth={ containerWidth }
|
|
@@ -657,27 +655,32 @@ export function RichTextWrapper(
|
|
|
657
655
|
);
|
|
658
656
|
}
|
|
659
657
|
|
|
660
|
-
|
|
658
|
+
// This export does not actually implement a private API, but was exported
|
|
659
|
+
// under this name for interoperability with the web version of the RichText
|
|
660
|
+
// component.
|
|
661
|
+
export const PrivateRichText = withDeprecations(
|
|
661
662
|
forwardRef( RichTextWrapper )
|
|
662
663
|
);
|
|
663
664
|
|
|
664
|
-
|
|
665
|
+
PrivateRichText.Content = Content;
|
|
665
666
|
|
|
666
|
-
|
|
667
|
+
PrivateRichText.isEmpty = ( value ) => {
|
|
667
668
|
return ! value || value.length === 0;
|
|
668
669
|
};
|
|
669
670
|
|
|
670
|
-
|
|
671
|
+
PrivateRichText.Content.defaultProps = {
|
|
671
672
|
format: 'string',
|
|
672
673
|
value: '',
|
|
673
674
|
};
|
|
674
675
|
|
|
675
|
-
|
|
676
|
+
PrivateRichText.Raw = forwardRef( ( props, ref ) => (
|
|
677
|
+
<RichText { ...props } nativeEditorRef={ ref } />
|
|
678
|
+
) );
|
|
676
679
|
|
|
677
680
|
/**
|
|
678
681
|
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md
|
|
679
682
|
*/
|
|
680
|
-
export default
|
|
683
|
+
export default PrivateRichText;
|
|
681
684
|
export { RichTextShortcut } from './shortcut';
|
|
682
685
|
export { RichTextToolbarButton } from './toolbar-button';
|
|
683
686
|
export { __unstableRichTextInputEvent } from './input-event';
|
|
@@ -1222,8 +1222,8 @@ export class RichText extends Component {
|
|
|
1222
1222
|
ref={ ( ref ) => {
|
|
1223
1223
|
this._editor = ref;
|
|
1224
1224
|
|
|
1225
|
-
if ( this.props.
|
|
1226
|
-
this.props.
|
|
1225
|
+
if ( this.props.nativeEditorRef ) {
|
|
1226
|
+
this.props.nativeEditorRef( ref );
|
|
1227
1227
|
}
|
|
1228
1228
|
} }
|
|
1229
1229
|
style={ {
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { forwardRef } from '@wordpress/element';
|
|
5
5
|
import { children as childrenSource } from '@wordpress/blocks';
|
|
6
|
-
import { useInstanceId } from '@wordpress/compose';
|
|
7
6
|
import { __unstableCreateElement } from '@wordpress/rich-text';
|
|
8
7
|
import deprecated from '@wordpress/deprecated';
|
|
9
8
|
|
|
@@ -36,12 +35,10 @@ export function withDeprecations( Component ) {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
const NewComponent = props.multiline ? RichTextMultiline : Component;
|
|
39
|
-
const instanceId = useInstanceId( NewComponent );
|
|
40
38
|
|
|
41
39
|
return (
|
|
42
40
|
<NewComponent
|
|
43
41
|
{ ...props }
|
|
44
|
-
identifier={ props.identifier || instanceId }
|
|
45
42
|
value={ value }
|
|
46
43
|
onChange={ onChange }
|
|
47
44
|
ref={ ref }
|
|
@@ -46,6 +46,7 @@ const ImageURLInputUI = ( {
|
|
|
46
46
|
showLightboxSetting,
|
|
47
47
|
lightboxEnabled,
|
|
48
48
|
onSetLightbox,
|
|
49
|
+
resetLightbox,
|
|
49
50
|
} ) => {
|
|
50
51
|
const [ isOpen, setIsOpen ] = useState( false );
|
|
51
52
|
// Use internal state instead of a ref to make sure that the component
|
|
@@ -241,7 +242,9 @@ const ImageURLInputUI = ( {
|
|
|
241
242
|
);
|
|
242
243
|
|
|
243
244
|
const linkEditorValue = urlInput !== null ? urlInput : url;
|
|
244
|
-
const
|
|
245
|
+
const hideLightboxPanel =
|
|
246
|
+
! lightboxEnabled || ( lightboxEnabled && ! showLightboxSetting );
|
|
247
|
+
const showLinkEditor = ! linkEditorValue && hideLightboxPanel;
|
|
245
248
|
|
|
246
249
|
const urlLabel = (
|
|
247
250
|
getLinkDestinations().find(
|
|
@@ -249,6 +252,65 @@ const ImageURLInputUI = ( {
|
|
|
249
252
|
) || {}
|
|
250
253
|
).title;
|
|
251
254
|
|
|
255
|
+
const PopoverChildren = () => {
|
|
256
|
+
if (
|
|
257
|
+
lightboxEnabled &&
|
|
258
|
+
showLightboxSetting &&
|
|
259
|
+
! url &&
|
|
260
|
+
! isEditingLink
|
|
261
|
+
) {
|
|
262
|
+
return (
|
|
263
|
+
<div className="block-editor-url-popover__expand-on-click">
|
|
264
|
+
<Icon icon={ fullscreen } />
|
|
265
|
+
<div className="text">
|
|
266
|
+
<p>{ __( 'Expand on click' ) }</p>
|
|
267
|
+
<p className="description">
|
|
268
|
+
{ __( 'Scales the image with a lightbox effect' ) }
|
|
269
|
+
</p>
|
|
270
|
+
</div>
|
|
271
|
+
<Button
|
|
272
|
+
icon={ linkOff }
|
|
273
|
+
label={ __( 'Disable expand on click' ) }
|
|
274
|
+
onClick={ () => {
|
|
275
|
+
onSetLightbox( false );
|
|
276
|
+
} }
|
|
277
|
+
size="compact"
|
|
278
|
+
/>
|
|
279
|
+
</div>
|
|
280
|
+
);
|
|
281
|
+
} else if ( ! url || isEditingLink ) {
|
|
282
|
+
return (
|
|
283
|
+
<URLPopover.LinkEditor
|
|
284
|
+
className="block-editor-format-toolbar__link-container-content"
|
|
285
|
+
value={ linkEditorValue }
|
|
286
|
+
onChangeInputValue={ setUrlInput }
|
|
287
|
+
onSubmit={ onSubmitLinkChange() }
|
|
288
|
+
autocompleteRef={ autocompleteRef }
|
|
289
|
+
/>
|
|
290
|
+
);
|
|
291
|
+
} else if ( url && ! isEditingLink ) {
|
|
292
|
+
return (
|
|
293
|
+
<>
|
|
294
|
+
<URLPopover.LinkViewer
|
|
295
|
+
className="block-editor-format-toolbar__link-container-content"
|
|
296
|
+
url={ url }
|
|
297
|
+
onEditLinkClick={ startEditLink }
|
|
298
|
+
urlLabel={ urlLabel }
|
|
299
|
+
/>
|
|
300
|
+
<Button
|
|
301
|
+
icon={ linkOff }
|
|
302
|
+
label={ __( 'Remove link' ) }
|
|
303
|
+
onClick={ () => {
|
|
304
|
+
onLinkRemove();
|
|
305
|
+
resetLightbox();
|
|
306
|
+
} }
|
|
307
|
+
size="compact"
|
|
308
|
+
/>
|
|
309
|
+
</>
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
|
|
252
314
|
return (
|
|
253
315
|
<>
|
|
254
316
|
<ToolbarButton
|
|
@@ -258,7 +320,9 @@ const ImageURLInputUI = ( {
|
|
|
258
320
|
aria-expanded={ isOpen }
|
|
259
321
|
onClick={ openLinkUI }
|
|
260
322
|
ref={ setPopoverAnchor }
|
|
261
|
-
isActive={
|
|
323
|
+
isActive={
|
|
324
|
+
!! url || ( lightboxEnabled && showLightboxSetting )
|
|
325
|
+
}
|
|
262
326
|
/>
|
|
263
327
|
{ isOpen && (
|
|
264
328
|
<URLPopover
|
|
@@ -267,7 +331,7 @@ const ImageURLInputUI = ( {
|
|
|
267
331
|
onFocusOutside={ onFocusOutside() }
|
|
268
332
|
onClose={ closeLinkUI }
|
|
269
333
|
renderSettings={
|
|
270
|
-
|
|
334
|
+
hideLightboxPanel ? () => advancedOptions : null
|
|
271
335
|
}
|
|
272
336
|
additionalControls={
|
|
273
337
|
showLinkEditor && (
|
|
@@ -314,54 +378,7 @@ const ImageURLInputUI = ( {
|
|
|
314
378
|
}
|
|
315
379
|
offset={ 13 }
|
|
316
380
|
>
|
|
317
|
-
{ (
|
|
318
|
-
<>
|
|
319
|
-
<URLPopover.LinkEditor
|
|
320
|
-
className="block-editor-format-toolbar__link-container-content"
|
|
321
|
-
value={ linkEditorValue }
|
|
322
|
-
onChangeInputValue={ setUrlInput }
|
|
323
|
-
onSubmit={ onSubmitLinkChange() }
|
|
324
|
-
autocompleteRef={ autocompleteRef }
|
|
325
|
-
/>
|
|
326
|
-
</>
|
|
327
|
-
) }
|
|
328
|
-
{ url && ! isEditingLink && ! lightboxEnabled && (
|
|
329
|
-
<>
|
|
330
|
-
<URLPopover.LinkViewer
|
|
331
|
-
className="block-editor-format-toolbar__link-container-content"
|
|
332
|
-
url={ url }
|
|
333
|
-
onEditLinkClick={ startEditLink }
|
|
334
|
-
urlLabel={ urlLabel }
|
|
335
|
-
/>
|
|
336
|
-
<Button
|
|
337
|
-
icon={ linkOff }
|
|
338
|
-
label={ __( 'Remove link' ) }
|
|
339
|
-
onClick={ onLinkRemove }
|
|
340
|
-
size="compact"
|
|
341
|
-
/>
|
|
342
|
-
</>
|
|
343
|
-
) }
|
|
344
|
-
{ ! url && ! isEditingLink && lightboxEnabled && (
|
|
345
|
-
<div className="block-editor-url-popover__expand-on-click">
|
|
346
|
-
<Icon icon={ fullscreen } />
|
|
347
|
-
<div className="text">
|
|
348
|
-
<p>{ __( 'Expand on click' ) }</p>
|
|
349
|
-
<p className="description">
|
|
350
|
-
{ __(
|
|
351
|
-
'Scales the image with a lightbox effect'
|
|
352
|
-
) }
|
|
353
|
-
</p>
|
|
354
|
-
</div>
|
|
355
|
-
<Button
|
|
356
|
-
icon={ linkOff }
|
|
357
|
-
label={ __( 'Disable expand on click' ) }
|
|
358
|
-
onClick={ () => {
|
|
359
|
-
onSetLightbox( false );
|
|
360
|
-
} }
|
|
361
|
-
size="compact"
|
|
362
|
-
/>
|
|
363
|
-
</div>
|
|
364
|
-
) }
|
|
381
|
+
{ PopoverChildren() }
|
|
365
382
|
</URLPopover>
|
|
366
383
|
) }
|
|
367
384
|
</>
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
store as blocksStore,
|
|
7
7
|
isReusableBlock,
|
|
8
8
|
isTemplatePart,
|
|
9
|
+
__experimentalGetBlockLabel as getBlockLabel,
|
|
9
10
|
} from '@wordpress/blocks';
|
|
10
11
|
import { __ } from '@wordpress/i18n';
|
|
11
12
|
|
|
@@ -68,11 +69,8 @@ export default function useBlockDisplayInformation( clientId ) {
|
|
|
68
69
|
return useSelect(
|
|
69
70
|
( select ) => {
|
|
70
71
|
if ( ! clientId ) return null;
|
|
71
|
-
const {
|
|
72
|
-
|
|
73
|
-
getBlockAttributes,
|
|
74
|
-
__experimentalGetReusableBlockTitle,
|
|
75
|
-
} = select( blockEditorStore );
|
|
72
|
+
const { getBlockName, getBlockAttributes } =
|
|
73
|
+
select( blockEditorStore );
|
|
76
74
|
const { getBlockType, getActiveBlockVariation } =
|
|
77
75
|
select( blocksStore );
|
|
78
76
|
const blockName = getBlockName( clientId );
|
|
@@ -80,12 +78,12 @@ export default function useBlockDisplayInformation( clientId ) {
|
|
|
80
78
|
if ( ! blockType ) return null;
|
|
81
79
|
const attributes = getBlockAttributes( clientId );
|
|
82
80
|
const match = getActiveBlockVariation( blockName, attributes );
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
const isSynced =
|
|
82
|
+
isReusableBlock( blockType ) || isTemplatePart( blockType );
|
|
83
|
+
const syncedTitle = isSynced
|
|
84
|
+
? getBlockLabel( blockType, attributes )
|
|
86
85
|
: undefined;
|
|
87
|
-
const title =
|
|
88
|
-
const isSynced = isReusable || isTemplatePart( blockType );
|
|
86
|
+
const title = syncedTitle || blockType.title;
|
|
89
87
|
const positionLabel = getPositionTypeLabel( attributes );
|
|
90
88
|
const blockTypeInfo = {
|
|
91
89
|
isSynced,
|
package/src/hooks/anchor.js
CHANGED
|
@@ -70,17 +70,19 @@ function BlockEditAnchorControlPure( { anchor, setAttributes } ) {
|
|
|
70
70
|
help={
|
|
71
71
|
<>
|
|
72
72
|
{ __(
|
|
73
|
-
'Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor
|
|
73
|
+
'Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor”. Then, you’ll be able to link directly to this section of your page.'
|
|
74
74
|
) }
|
|
75
|
-
|
|
76
75
|
{ isWeb && (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
<>
|
|
77
|
+
{ ' ' }
|
|
78
|
+
<ExternalLink
|
|
79
|
+
href={ __(
|
|
80
|
+
'https://wordpress.org/documentation/article/page-jumps/'
|
|
81
|
+
) }
|
|
82
|
+
>
|
|
83
|
+
{ __( 'Learn more about anchors' ) }
|
|
84
|
+
</ExternalLink>
|
|
85
|
+
</>
|
|
84
86
|
) }
|
|
85
87
|
</>
|
|
86
88
|
}
|