Title: How to add content-only editing support to a block
Author: Nick Diego
Published: November 5, 2024

---

 * [Showcase](https://wordpress.org/showcase/)
 * [Plugins](https://wordpress.org/plugins/)
 * [Themes](https://wordpress.org/themes/)
 * [Hosting](https://wordpress.org/hosting/)
 * [News](https://wordpress.org/news/)
    - [Learn WordPress](https://learn.wordpress.org/)
    - [Documentation](https://wordpress.org/documentation/)
    - [Education](https://wordpress.org/education/)
    - [Forums](https://wordpress.org/support/forums/)
    - [Developers](https://developer.wordpress.org/)
    - [Blocks](https://wordpress.org/blocks/)
    - [Patterns](https://wordpress.org/patterns/)
    - [Photos](https://wordpress.org/photos/)
    - [Openverse ︎](https://openverse.org/)
    - [WordPress.tv ︎](https://wordpress.tv/)
 *  - [About WordPress](https://wordpress.org/about/)
    - [Make WordPress](https://make.wordpress.org/)
    - [Events](https://events.wordpress.org/)
    - [Five for the Future](https://wordpress.org/five-for-the-future/)
    - [Enterprise](https://wordpress.org/enterprise/)
    - [Gutenberg ︎](https://wordpress.org/gutenberg/)
    - [Job Board ︎](https://jobs.wordpress.net/)
 * [Swag ︎](https://mercantile.wordpress.org/)
 * [Get WordPress](https://wordpress.org/download/)

Search in WordPress.org

 [ Get WordPress ](https://wordpress.org/download/)

[WordPress Developer Blog](https://developer.wordpress.org/news)

How to add content-only editing support to a block

 * [Snippets](https://developer.wordpress.org/news/snippets/)
    - [Blocks](https://developer.wordpress.org/news/category/blocks/)
    - [Concepts](https://developer.wordpress.org/news/category/concepts/)
    - [Common APIs](https://developer.wordpress.org/news/category/common-apis/)
    - [Design](https://developer.wordpress.org/news/category/design/)
    - [Playground](https://developer.wordpress.org/news/category/playground/)
    - [Plugins](https://developer.wordpress.org/news/category/plugins/)
    - [Themes](https://developer.wordpress.org/news/category/themes/)
 *  - [About this site](https://developer.wordpress.org/news/about/)
    - [Updates](https://developer.wordpress.org/news/category/updates/)
    - [How to contribute](https://developer.wordpress.org/news/how-to-contribute/)
    - [Tips and guidelines](https://developer.wordpress.org/news/tips-and-guidelines-for-writers/)
 * [Subscribe](https://developer.wordpress.org/news/subscribe/)
 * [Developer Resources](https://developer.wordpress.org/)

 * [Snippets](https://developer.wordpress.org/news/snippets/)
    - [Blocks](https://developer.wordpress.org/news/category/blocks/)
    - [Concepts](https://developer.wordpress.org/news/category/concepts/)
    - [Common APIs](https://developer.wordpress.org/news/category/common-apis/)
    - [Design](https://developer.wordpress.org/news/category/design/)
    - [Playground](https://developer.wordpress.org/news/category/playground/)
    - [Plugins](https://developer.wordpress.org/news/category/plugins/)
    - [Themes](https://developer.wordpress.org/news/category/themes/)
 *  - [About this site](https://developer.wordpress.org/news/about/)
    - [Updates](https://developer.wordpress.org/news/category/updates/)
    - [How to contribute](https://developer.wordpress.org/news/how-to-contribute/)
    - [Tips and guidelines](https://developer.wordpress.org/news/tips-and-guidelines-for-writers/)
 * [Subscribe](https://developer.wordpress.org/news/subscribe/)
 * [Developer Resources](https://developer.wordpress.org/)

# How to add content-only editing support to a block

By [Nick Diego](https://profiles.wordpress.org/ndiego/)

November 5, 2024

[Advanced](https://developer.wordpress.org/news/category/advanced/), [Blocks](https://developer.wordpress.org/news/category/blocks/),
[Plugins](https://developer.wordpress.org/news/category/plugins/)

WordPress 6.7 introduces many exciting features, but one subtle enhancement worth
noting is the stabilization of content-only editing, now ready for use by extenders
and block developers.

Although content-only editing was [first introduced](https://make.wordpress.org/core/2022/10/11/content-locking-features-and-updates/)
in WordPress 6.1, supporting this mode in custom blocks previously required an experimental
property in `block.json`. Combined with the absence of an editor interface for applying
content-only mode, it has remained one of the more overlooked and underutilized 
features of the block editor. But that might be changing soon.

So, if this is the first you’ve heard about content-only editing, don’t worry—you
are not alone.

In this article, I’ll explain what content-only editing is, why it’s important to
support it in your blocks, and how to implement it using a practical example.

Table of Contents

 1. [What is content-only editing?](https://developer.wordpress.org/news/2024/11/05/how-to-add-content-only-editing-support-to-a-block/#what-is-content-only-editing)
 2. [Why support this editing mode?](https://developer.wordpress.org/news/2024/11/05/how-to-add-content-only-editing-support-to-a-block/#why-support-this-editing-mode)
 3. [How to add content-only support to a block](https://developer.wordpress.org/news/2024/11/05/how-to-add-content-only-editing-support-to-a-block/#how-to-add-content-only-support-to-a-block)
 4.  a. [Updating block.json](https://developer.wordpress.org/news/2024/11/05/how-to-add-content-only-editing-support-to-a-block/#updating-block-json)
     b. [Adding a custom editing experience](https://developer.wordpress.org/news/2024/11/05/how-to-add-content-only-editing-support-to-a-block/#adding-a-custom-editing-experience)
     c. [Applying the finishing touches](https://developer.wordpress.org/news/2024/11/05/how-to-add-content-only-editing-support-to-a-block/#applying-the-finishing-touches)
 5. [Closing thoughts](https://developer.wordpress.org/news/2024/11/05/how-to-add-content-only-editing-support-to-a-block/#closing-thoughts)

## What is content-only editing?

[Content-only editing](https://make.wordpress.org/core/2022/10/11/content-locking-features-and-updates/)
was added to WordPress two years ago as an additional locking mechanism designed
to reduce the need to create custom blocks for layouts that could alternatively 
be built using block patterns.

The main advantage of using a custom block is that it gives you complete control
over what users can edit, such as restricting them to only editing text, images,
and other content elements. This simplifies the editing experience for users while
maintaining a consistent layout and enforcing design standards. 

Content-only editing provides similar functionality to all blocks natively.

You enable it by adding `templateLock: contentOnly` to a container block, like Group,
Column, and Cover. Once active, users can only edit specific elements of the nested
content. Blocks without editable content are hidden from the List View and cannot
be selected. Additionally, the Settings Sidebar for all blocks is disabled.

While often applied to blocks and patterns, you can also use content-only editing
to lock entire page templates. For more information, refer to the [Block Templates](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-templates/#locking)
documentation. 

To demonstrate how this works, consider the following block layout, which features
a Group block containing a Heading, Paragraph, and Social Icons block. Block styles
and settings have been applied, and this example uses the Twenty Twenty-Five theme
coming in WordPress 6.7.

![The sample block layout that will be used for the remainder of the article.](https://
developer.wordpress.org/news/files/2024/11/content-only-default-pattern.png)

In WordPress’s default editing mode, users can change anything they want about this
design. Here’s the block markup for reference.

    ```language-markup
    <!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"},"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"backgroundColor":"accent-5","layout":{"type":"constrained"}} -->
    <div class="wp-block-group has-accent-5-background-color has-background" style="margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70);padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
        <!-- wp:heading -->
        <h2 class="wp-block-heading">Speaker Name</h2>
        <!-- /wp:heading -->

        <!-- wp:paragraph -->
        <p>Speaker Description—Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus luctus urna sed urna ultricies ac tempor dui sagittis.</p>
        <!-- /wp:paragraph -->

        <!-- wp:social-links {"iconColor":"accent-5","iconColorValue":"#FBFAF3","iconBackgroundColor":"contrast","iconBackgroundColorValue":"#111111","showLabels":true,"size":"has-normal-icon-size","style":{"spacing":{"margin":{"top":"var:preset|spacing|50"}}}} -->
        <ul class="wp-block-social-links has-normal-icon-size has-visible-labels has-icon-color has-icon-background-color" style="margin-top:var(--wp--preset--spacing--50)">
            <!-- wp:social-link {"url":"#","service":"wordpress"} /-->
            <!-- wp:social-link {"url":"#","service":"chain"} /-->
            <!-- wp:social-link {"url":"#","service":"mail"} /-->
        </ul>
        <!-- /wp:social-links -->
    </div>
    <!-- /wp:group -->
    ```

Now, let’s apply the `"templateLock": "contentOnly"` attribute to the block markup
of the Group block. You only need to modify the attribute object. The rest of the
block markup should remain the same.

    ```language-markup
    <!-- wp:group {"templateLock": "contentOnly","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"backgroundColor":"accent-5","layout":{"type":"constrained"}} -->
    ```

To follow along, open a WordPress Playground instance running WordPress 6.7. [Here’s a handy link](https://playground.wordpress.net/?php=8.0&wp=beta&networking=no&language=&multisite=no).

 1. Navigate to a new page.
 2. Open the Code Editor, and copy and paste the original block markup above.
 3. Add the `"templateLock": "contentOnly"` attribute to the Group block.
 4. Switch back to the Visual Editor. 

With those steps completed, you should see something like this.

![The sample block layout with content-only mode enabled.](https://developer.wordpress.
org/news/files/2024/11/content-only-default-pattern-locked.png)

If you compare the block layout in content-only mode to the default editing experience,
you will quickly notice a few things:

 1. The List View is simplified and only displays the container (Group) and any internal
    blocks with editable content.
 2. The Settings Sidebar no longer displays block settings or styles, only the block
    style variations that are available to the container Group block.
 3. There is a new Content panel in the Settings Sidebar displaying the editable content
    blocks within the container.
 4. The icons in the Social Icons block are no longer editable. (Note this for later
    in the article)

## Why support this editing mode?

Content-only editing is a powerful tool for creating curated and simplified user
experiences. To make this feature effective, blocks must be designed to support 
it. For instance, as noted earlier, the Social Icons block currently does not function
in this mode.

While future WordPress updates will address full support across core blocks, most
sites include at least one custom block. For block developers, ensuring compatibility
with content-only editing is essential. Prior to WordPress 6.7, enabling this feature
in custom blocks required an experimental property in `block.json` called `__experimentalRole`.
Now that the `role` property [has been stabilized](https://github.com/WordPress/gutenberg/pull/65484),
adding support is generally straightforward.

You still might wonder why content-only editing is so important, especially since
it has remained relatively niche until now. The answer lies in the new [Write mode](https://make.wordpress.org/core/2024/10/09/whats-new-in-gutenberg-15-9-31-may-2/#new-write-design-modes)
in Gutenberg and the increased emphasis on content-only editing outlined in the 
[Design Editor Overview](https://github.com/WordPress/gutenberg/issues/66499) issue
on GitHub.

![The Write and Design modes in Gutenberg.](https://developer.wordpress.org/news/
files/2024/11/content-only-write-mode.png)

These developments underline the future importance of content-only editing and its
role in creating a simpler, more controlled editing experience within WordPress’s
broader design tools. It’s time to get your blocks ready.

## How to add content-only support to a block

Although I initially planned to create an example block plugin for this article,
let’s instead examine the Social Link block in WordPress since it’s currently disabled
in content-only mode as of WordPress 6.7. You can view the [source code](https://github.com/WordPress/gutenberg/tree/wp/6.7/packages/block-library/src/social-link)
in the Gutenberg plugin.

The Social Link block is a child of the Social Icons (Social Links) block, which
displays a row or column of icons that link to social profiles or websites. In many
cases, you might want users to be able to modify link URLs in content-only mode.
This is especially useful when a block layout is provided as a pattern that can 
be used in different contexts, such as the speaker profile block design shown earlier.

Here’s a quick demonstration of how these blocks work. Notice how toggling **Show
text** displays a label for each icon.

For the remainder of this article, I will refer to the blocks by their technical
names as used in the WordPress source code and block markup: `wp:social-links` and`
wp:social-link`. Just remember that the Social Links block appears as the Social
Icons block in the Editor, while the Social Link block is represented by the individual
platform names such as WordPress, Facebook, LinkedIn, Link, Mail, etc.

So, let’s assume that the Social Link block is your custom block that needs content-
only editing support. How do you go about implementing this?

### Updating block.json

The first step is to update the [`block.json`](https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/social-link/block.json)
file of the Social Link block by adding the `"role": "content"` property to each
attribute that should be editable when  `"templateLock": "contentOnly"` is set. 

For this example, the `url` and `label` attributes should be available. The `url`
attribute holds the link for the social icon, while the `label` attribute represents
an optional text label for the icon when **Show text** is enabled in the parent 
Social Links block.

The updated attributes section of the `block.json` file should look like this:

    ```language-json
    {
    	"$schema": "https://schemas.wp.org/trunk/block.json",
    	"apiVersion": 3,
    	"name": "core/social-link",
    	"title": "Social Icon",
    	"category": "widgets",
    	"parent": [ "core/social-links" ],
    	"description": "Display an icon linking to a social profile or site.",
    	"textdomain": "default",
    	"attributes": {
    		"url": {
    			"type": "string",
    			"role": "content"
    		},
    		"service": {
    			"type": "string"
    		},
    		"label": {
    			"type": "string",
    			"role": "content"
    		},
    		"rel": {
    			"type": "string"
    		}
    	},
    	...
    ```

If you are adding content-only editing to your own block and need to support older
versions of WordPress, use `__experimentalRole` instead of `role` until you are 
ready to set the minimum WordPress version to 6.7. The only downside to this approach
is a minor deprecation warning in the console.

With these changes, URL editing for social icons will be enabled automatically. 
This works because the `url` attribute is managed using the [`<SocialLinkURLPopover>`](https://github.com/WordPress/gutenberg/blob/d2157ff77396fb9a725d205975bb58922c818c05/packages/block-library/src/social-link/edit.js#L189)
component, which is part of the Editor canvas when the block is inserted. A block’s
canvas elements become editable when at least one attribute is assigned the `"role":"
content"` property.

You can see this demonstrated below.

![URL editing is enabled in the Social Link block.](https://developer.wordpress.
org/news/files/2024/11/content-only-url-editor-canvas.png)

The `label` attribute, on the other hand, is normally set using the **Text** field
in the Settings Sidebar. The sidebar is disabled in content-only mode.

![The text input for the 'label' attribute in the Settings Sidebar.](https://developer.
wordpress.org/news/files/2024/11/content-only-setting-sidebar-text.png)

If you want a block attribute that is typically set in the sidebar to be editable
in content-only mode, you need to create an alternative editing experience within
the block. 

A great way to approach this is by taking inspiration from existing WordPress blocks.
For example, the Image block allows users to edit the image’s alt text using an **
Alternative text** dropdown in the block toolbar ([source code](https://github.com/WordPress/gutenberg/blob/49c3bf9b8791546231826feeff8681ed3d9ab153/packages/block-library/src/image/image.js#L772)).

![The Alternative text dropdown in the Image block when content-only mode is enabled.](
https://developer.wordpress.org/news/files/2024/11/content-only-image-alt-text.png)

Let’s apply a similar approach to the Social Link block.

### Adding a custom editing experience

To begin, add a button to the block toolbar of the Social Link block by including
content within a [`<BlockControls>`](https://developer.wordpress.org/block-editor/getting-started/fundamentals/block-in-the-editor/#block-controls-block-toolbar-and-settings-sidebar)
component. For this, let’s follow the approach used in the Image block and implement
a [`<Dropdown>`](https://wordpress.github.io/gutenberg/?path=/docs/components-dropdown--docs)
component. 

The following code should be placed within the `return` statement of the block’s`
Edit()` function.

    ```javascript
    return (
    	<>
    		<BlockControls group="other">
    			<Dropdown
    				popoverProps={ { position: 'bottom right' } }
    				renderToggle={ ( { isOpen, onToggle } ) => (
    					<ToolbarButton
    						onClick={ onToggle }
    						aria-haspopup="true"
    						aria-expanded={ isOpen }
    					>
    						{ __( 'Text' ) }
    					</ToolbarButton>
    				) }
    				renderContent={ () => (
    					<TextControl
    						className="wp-block-social-link__toolbar_content_text"
    						label={ __( 'Text' ) }
    						help={ __( 'Provide a text label or use the default.' ) }
    						value={ label }
    						onChange={ ( value ) => setAttributes( { label: value } ) }
    						placeholder={ socialLinkName }
    					/>
    				) }
    			/>
    		</BlockControls>
    		<InspectorControls>
    			...
    ```

The `<Dropdown>` component includes two key properties: `renderToggle` and `renderContent`.

The `renderToggle` property is responsible for displaying the component that triggers
the dropdown. In this case, a [`<ToolbarButton>`](https://wordpress.github.io/gutenberg/?path=/docs/components-toolbar--docs)
is used since it’s designed to integrate seamlessly within block toolbars. 

The `renderContent` property specifies what is displayed when the dropdown opens.
In this example, it contains a `<TextControl>` component used to set the `label`
attribute. This `<TextControl>` is similar to the text input found in the block’s
Settings Sidebar.

There are a few other details to note:

 * The `<BlockControls>` component includes the `group="other"` property, which 
   ensures the Text button is positioned correctly within the toolbar.
 * The position of the dropdown is managed through the `popoverProps` property.
 * The `<TextControl>` component is assigned a custom class for styling purposes.

Once the code for the toolbar dropdown is added, the block will look like this.

![The Text dropdown in the Social Link block when content-only is enabled.](https://
developer.wordpress.org/news/files/2024/11/content-only-label-popover-error-1.png)

You may have noticed two issues right away. First, the width of the dropdown needs
to be fixed using CSS. Second, the **Text** button should not always be visible 
in the toolbar. 

When the block is not in content-only mode, users can already modify the `label`
attribute from the Settings Sidebar. Additionally, if **Show text** is not enabled
on the parent Social Links block, the button should not be displayed, regardless
of the editing mode.

### Applying the finishing touches

Let’s start with the easiest one. The dropdown width can be set by targeting the
custom class added to the `<TextControl>` component. The following CSS should be
added to the block’s `editor.scss` file.

    ```language-sass
    .wp-block-social-link__toolbar_content_text {
    	// Corresponds to the size of the text control input in the block inspector.
    	width: 250px;
    }
    ```

Next, you need to conditionally display the toolbar button based on the current 
editing mode and whether **Show text** is enabled.

The Social Link block already receives the `showLabels` value from the context provided
by its parent, the Social Links block ([source code](https://github.com/WordPress/gutenberg/blob/49c3bf9b8791546231826feeff8681ed3d9ab153/packages/block-library/src/social-link/edit.js#L108)).
The editing mode can be determined using the [`useBlockEditingMode`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockeditingmode)
function.

Start by importing `useBlockEditingMode` from the `@wordpress/block-editor` package
and defining the following constant in the block’s `Edit()` function:

    ```javascript
    const isContentOnlyMode = useBlockEditingMode() === 'contentOnly';
    ```

Now, wrap the `<BlockControls>` component created earlier in a conditional statement
that checks for both `isContentOnlyMode` and `showLabels`.

    ```javascript
    return (
    	<>
    		{ isContentOnlyMode && showLabels && (
    			<BlockControls group="other">
    				...
    			</BlockControls>
    		) }
    		<InspectorControls>
    			...
    ```

The **Text** button in the toolbar will now display properly. When the Social Link
block is in `contentOnly` mode, and **Show text** is enabled, users will be able
to set both the icon link and the text label. 

Here’s a demonstration of the finished product.

You can find the full code for this example in the [pull request](https://github.com/WordPress/gutenberg/pull/66622)
that introduces content-only editing support for the Social Link block in the Gutenberg
plugin. This functionality is expected to be included with WordPress 6.8 in early
2025.

Overall, the changes needed for the Social Link block were relatively minor. However,
the modifications your custom blocks need will depend on their complexity and the
amount of editing control you want to give users.

## Closing thoughts

If you build custom blocks, consider whether some could be replaced with block patterns
locked with content-only editing. If not, ensure your blocks support this mode. 
Although content-only editing is still somewhat niche, WordPress is expected to 
expand its use, and site builders using your blocks will come to expect it.

This is similar to adding official [block supports](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/)
so that your block’s styles and settings can be managed through `theme.json` and
modified in Global Styles. Aligning your custom solutions with core functionality
makes them more adaptable and robust.

As you explore content-only editing, feel free to share any questions or challenges
you encounter during implementation in the comments.

_Props to [@greenshady](https://profiles.wordpress.org/greenshady/), [@fabiankaegy](https://profiles.wordpress.org/fabiankaegy/),
and [@get\_dave](https://profiles.wordpress.org/get_dave/) for feedback and review
on this post._

**Share the post: **

**Categories:** [Advanced](https://developer.wordpress.org/news/category/advanced/),
[Blocks](https://developer.wordpress.org/news/category/blocks/), [Plugins](https://developer.wordpress.org/news/category/plugins/)

**Tags:** [Block development](https://developer.wordpress.org/news/tag/block-development/),
[Extenders](https://developer.wordpress.org/news/tag/extenders/)

## 11 responses to “How to add content-only editing support to a block”

 1.  ![NICHOLAS AMOL GOMES Avatar](https://secure.gravatar.com/avatar/e7b336c3bc67482e11c17ea3fbef2779bbcef365828685b7ea7acd4816d55e0a?
     s=40&d=identicon&r=g)
 2.  [NICHOLAS AMOL GOMES](http://http)
 3.  [November 6, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13569)
 4.  Thank you fot your support sharing me
 5.  [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13569#respond)
 6.  ![Alberto Prado Avatar](https://secure.gravatar.com/avatar/1b0c704cb4942dbae9b171341ee95b3e2cb7cd2d6dc0bcdaa4dcee89f3fc0a8d?
     s=40&d=identicon&r=g)
 7.  [Alberto Prado](https://alprado.com/)
 8.  [November 6, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13570)
 9.  It seems like an incredible tool for simplifying content creation, though it still
     feels somewhat more complex than creating a page filled with ACF fields.
 10. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13570#respond)
 11.  a. ![Shams Khan Avatar](https://secure.gravatar.com/avatar/27966b1f7e544a9c5dfa169b38f2907dec15eecc90eacfd7482794d5cf1d332c?
         s=40&d=identicon&r=g)
      b. Shams Khan
      c. [November 9, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13630)
      d. It is a long awaited, extremely essential feature but still not enough happy 
         with the complexity of implementation. Hope in near version it will be simplified.
      e. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13630#respond)
      f.  a. ![Nick Diego Avatar](https://secure.gravatar.com/avatar/5d499534bfc21eaf9fa55506d50ffa01881d9a6cba58935552d3a8ac45944c29?
             s=40&d=identicon&r=g)
          b. [Nick Diego](https://profiles.wordpress.org/ndiego/)
          c. [November 9, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13633)
          d. I agree that it would be great if this was simpler to implement. Adding the `
             role` property to attributes is quite simple. The challenging portion is adapting
             your custom block’s functionality to the content-only editing, which will often
             be unique to the block. Since each implementation may be different depending
             on the block, simplification might be challenging. Do you have any suggestions
             for what you would like to see?
          e. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13633#respond)
 12. ![RS Avatar](https://secure.gravatar.com/avatar/ca02c2c971b88803eedeefa285414ffe451158a3848bb51894a3a447efecb83c?
     s=40&d=identicon&r=g)
 13. RS
 14. [November 9, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13631)
 15. Thank you! This is a great feature!
      If we are using ACF Pro to create custom 
     blocks, does adding the “role”: “content” property to block.json file work? Does
     ACF Pro support the content-only editing feature?
 16. thanks!
 17. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13631#respond)
 18.  a. ![Nick Diego Avatar](https://secure.gravatar.com/avatar/5d499534bfc21eaf9fa55506d50ffa01881d9a6cba58935552d3a8ac45944c29?
         s=40&d=identicon&r=g)
      b. [Nick Diego](https://profiles.wordpress.org/ndiego/)
      c. [November 9, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13632)
      d. I am not sure how ACF Pro handles this feature. I recommend reaching out to ACF
         support.
      e. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13632#respond)
 19. ![nicmare Avatar](https://secure.gravatar.com/avatar/ad20b1ca5a5289349befad479fe855533f6ea14bbafe9f76c7ff44b65ada26d3?
     s=40&d=identicon&r=g)
 20. [nicmare](https://profiles.wordpress.org/nicmare/)
 21. [November 13, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13661)
 22. How about using cover block and i lock it but still want to be able to change 
     the image source? is it possible to give access to media library only?
 23. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13661#respond)
 24.  a. ![Nick Diego Avatar](https://secure.gravatar.com/avatar/5d499534bfc21eaf9fa55506d50ffa01881d9a6cba58935552d3a8ac45944c29?
         s=40&d=identicon&r=g)
      b. [Nick Diego](https://profiles.wordpress.org/ndiego/)
      c. [November 13, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13664)
      d. Yeah, the Cover block in Core will need some updating to provide better content-
         only editing support.
      e. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13664#respond)
 25. ![nicmare Avatar](https://secure.gravatar.com/avatar/ad20b1ca5a5289349befad479fe855533f6ea14bbafe9f76c7ff44b65ada26d3?
     s=40&d=identicon&r=g)
 26. [nicmare](https://profiles.wordpress.org/nicmare/)
 27. [November 13, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13662)
 28. ive noticed when an image block is placed inside the cover block, i can change
     the image of the image block but not the image of the cover block itself. is this
     intended?
 29. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13662#respond)
 30.  a. ![Nick Diego Avatar](https://secure.gravatar.com/avatar/5d499534bfc21eaf9fa55506d50ffa01881d9a6cba58935552d3a8ac45944c29?
         s=40&d=identicon&r=g)
      b. [Nick Diego](https://profiles.wordpress.org/ndiego/)
      c. [November 13, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13663)
      d. This is something that will need to be updated in Core. It looks like the Cover
         block does not yet have full content-only editing support.
      e. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13663#respond)
 31. ![Cathy Mitchell Avatar](https://secure.gravatar.com/avatar/a5ed92a575f48196859892840994c8f1e816908ce609246a26850d9a48a77331?
     s=40&d=identicon&r=g)
 32. [Cathy Mitchell](https://wpbarista.com)
 33. [November 14, 2024](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/#comment-13677)
 34. This is a whole philosophy of development: “Aligning your custom solutions with
     core functionality makes them more adaptable and robust.”
 35. I would add, “and extensible, and usable, and more in line with the open source
     culture”.
 36. Thank you for your work on this!
 37. [Reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?replytocom=13677#respond)

### Leave a Reply 󠀁[Cancel reply](https://developer.wordpress.org/news/2024/11/how-to-add-content-only-editing-support-to-a-block/?output_format=md#respond)󠁿

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

 Save my name, email, and website in this browser for the next time I comment.

 Notify me of follow-up comments by email.

 Notify me of new posts by email.

Δ

## Have an idea for a new post?

### 󠀁[Learn how to contribute](https://developer.wordpress.org/news/how-to-contribute/)󠁿

Share your knowledge with fellow WordPress developers.

Search

### 󠀁[Review tips and guidelines](https://developer.wordpress.org/news/tips-and-guidelines-for-writers/)󠁿

Everything you need to know about writing for the Blog.

## Subscribe to the Blog

  Email Address

 Join 1,771 other subscribers

 * [About](https://wordpress.org/about/)
 * [News](https://wordpress.org/news/)
 * [Hosting](https://wordpress.org/hosting/)
 * [Privacy](https://wordpress.org/about/privacy/)

 * [Showcase](https://wordpress.org/showcase/)
 * [Themes](https://wordpress.org/themes/)
 * [Plugins](https://wordpress.org/plugins/)
 * [Patterns](https://wordpress.org/patterns/)

 * [Learn](https://learn.wordpress.org/)
 * [Documentation](https://wordpress.org/documentation/)
 * [Developers](https://developer.wordpress.org/)
 * [WordPress.tv ](https://wordpress.tv/)

 * [Get Involved](https://make.wordpress.org/)
 * [Events](https://events.wordpress.org/)
 * [Donate ](https://wordpressfoundation.org/donate/)
 * [Swag ](https://mercantile.wordpress.org/)

 * [WordPress.com ](https://wordpress.com/?ref=wporg-footer)
 * [Matt ](https://ma.tt/)
 * [bbPress ](https://bbpress.org/)
 * [BuddyPress ](https://buddypress.org/)

 * [Visit our X (formerly Twitter) account](https://www.x.com/WordPress)
 * [Visit our Bluesky account](https://bsky.app/profile/wordpress.org)
 * [Visit our Mastodon account](https://mastodon.world/@WordPress)
 * [Visit our Threads account](https://www.threads.net/@wordpress)
 * [Visit our Facebook page](https://www.facebook.com/WordPress/)
 * [Visit our Instagram account](https://www.instagram.com/wordpress/)
 * [Visit our LinkedIn account](https://www.linkedin.com/company/wordpress)
 * [Visit our TikTok account](https://www.tiktok.com/@wordpress)
 * [Visit our YouTube channel](https://www.youtube.com/wordpress)
 * [Visit our Tumblr account](https://wordpress.tumblr.com/)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)

 The WordPress® trademark is the intellectual property of the WordPress Foundation.