diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js index d76f90bc94ffe..01ad8f69febc9 100644 --- a/packages/block-editor/src/store/private-selectors.js +++ b/packages/block-editor/src/store/private-selectors.js @@ -548,6 +548,15 @@ export function isZoomOutMode( state ) { return state.editorMode === 'zoom-out'; } +/** + * Retrieves the client ID of the block which contains the blocks + * acting as "sections" in the editor. This is typically the "main content" + * of the template/post. + * + * @param {Object} state Editor state. + * + * @return {string|undefined} The section root client ID or undefined if not set. + */ export function getSectionRootClientId( state ) { return state.settings?.[ sectionRootClientIdKey ]; }