Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-Only Editor Mode for all blocks on posts/pages #68479

Open
CreativeDive opened this issue Jan 3, 2025 · 7 comments
Open

Content-Only Editor Mode for all blocks on posts/pages #68479

CreativeDive opened this issue Jan 3, 2025 · 7 comments
Labels
[Feature] Write mode [Type] Enhancement A suggestion for improvement.

Comments

@CreativeDive
Copy link
Contributor

What problem does this address?

To provide a simpler editing experience for specific user roles on posts/pages/cpt it would be very helpful to have a switch or an API to change the block editing mode to "contentOnly".

I found this: wp.data.dispatch( 'core/block-editor' ).setBlockEditingMode('contentOnly');

But after applying setBlockEditingMode(), the mode is still 'default'.

@CreativeDive CreativeDive added the [Type] Enhancement A suggestion for improvement. label Jan 3, 2025
@CreativeDive
Copy link
Contributor Author

This feature is not only useful for certain user roles. A switch allows the user to toggle between "Content Only" and "All Options". This allows the user to focus on the content when editing a post or page.

@CreativeDive
Copy link
Contributor Author

Actually this feature already exists, but it has been disabled for posts/pages, even though it is very useful.
#66775

@Mamaduka
Copy link
Member

Mamaduka commented Jan 5, 2025

I think this is similar or related to #58038/#62304.

cc @fabiankaegy

@CreativeDive
Copy link
Contributor Author

@Mamaduka @fabiankaegy I don't know if this is already planned? It's hard to follow all the issues here. In Gutenberg 19.5. the dropdown to toggle between Design & Write mode was still available. But was removed in versions later for posts/pages/cpt:

Image

But I can't understand why this has been removed here? This is a very powerful tool:

write-mode.mp4

In this way we have the ability to:

  1. Set the writing mode for specific clients (without the ability to destroy the design).
  2. Set the writing mode for specific user roles
  3. ... toggle between Design/Write mode in production. So the user can change this while editing a post/page. In this way it's easily possible to set the focus on content, without all the design controls.

What I love on the Design & Write mode, is that each block has hidden design controls if the "Write" mode is selected.

When I read about content-only topics here, there is often talk of "template lock". What I mean here is that it should work for all blocks, regardless of whether they are group blocks or templates. It does not matter whether a block is on level 1 or has a block parent. Every block should be able to be switched to design/write mode.

If the Write/Design mode toggle should remain disabled for posts/pages/cpt, it would be very helpful if we could activate it ourselves via an API. When and where we need it. What is the status and what can we expect from the next WordPress release?

@CreativeDive
Copy link
Contributor Author

The optimal way to use the Write/Design toggle would be if we could display it individually for posts/pages/cpt. An API would be necessary for this. This way we can decide which user roles or which user only gets the Write mode and which user roles can switch between both modes.

@Mamaduka
Copy link
Member

Mamaduka commented Jan 6, 2025

@richtabor or @youknowriad might have more details.

@CreativeDive
Copy link
Contributor Author

CreativeDive commented Jan 6, 2025

Another thought I had, if a creator has created a bundle of pages for a client. The creator could have the ability to lock these pages to contentOnly for his client.

This approach would prevent the client from accidentally changing the design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Write mode [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants