You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love working with and developing on the Gutenberg. Lately I've been wondering if there is a clean way to overwrite a component that is in Gutenberg. An example would be the Text Toolbar. Certain settings can be removed via official APIs such as FormatTypes or TemplateLocks. But if I don't want to convert my content / pages into templates, I have no other official way to forbid options like drag and drop or removing a block to my client.
That's why I want to create my own toolbar. Are there ways and means to overwrite an entire component? For example, I am talking about:
Also, how can we remove individual block options? For example, I don't want the user to be able to convert a list from ul to ol via the text toolbar. Would I need to override the entire edit component (via filter) of a block to do this? Some options can be disabled by manipulating the block settings object, but some cannot.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey,
I love working with and developing on the Gutenberg. Lately I've been wondering if there is a clean way to overwrite a component that is in Gutenberg. An example would be the Text Toolbar. Certain settings can be removed via official APIs such as FormatTypes or TemplateLocks. But if I don't want to convert my content / pages into templates, I have no other official way to forbid options like drag and drop or removing a block to my client.
That's why I want to create my own toolbar. Are there ways and means to overwrite an entire component? For example, I am talking about:
gutenberg/packages/block-editor/src/components/block-toolbar/index.js
Line 26 in ab1380c
Also, how can we remove individual block options? For example, I don't want the user to be able to convert a list from ul to ol via the text toolbar. Would I need to override the entire edit component (via filter) of a block to do this? Some options can be disabled by manipulating the block settings object, but some cannot.
Beta Was this translation helpful? Give feedback.
All reactions