Disable Columns
This feature allows developers to configure the builder to remove the ability to create or edit multi-column blocks. When columns are disabled, blocks will be restricted to a single column, hiding the Columns tool and any multi-column layout options from the editing panel and the Blocks tab. This ensures that all created content will follow a single-column structure, which can be useful for simplifying designs or following specific layout constraints.
How It Works
When the columns feature is disabled, the following changes occur:
- The Columns tool is removed from the builder's toolbar.
- The ability to add multi-column blocks is disabled.
- Only single-column blocks will be available in the Blocks tab.
Enabling the Feature
To disable columns, you need to configure the builder by passing the columns: false
option within the editor configuration. This can be done when initializing the builder.
Example: Disabling Columns
cy.loadEditor({
editor: {
columns: false,
},
});
In this configuration:
columns: false
disables the columns feature, ensuring that only single-column blocks are allowed in the editor.
Use Case
This feature is useful for applications or use cases where multi-column layouts are not desired or needed. For instance:
- Mobile-First Designs: If your design is primarily targeting mobile devices, single-column layouts are typically preferred for readability and simplicity.
- Simplified User Experience: Removing the complexity of multi-column blocks can simplify the builder experience for less experienced end-users.
- Strict Design Guidelines: If your application enforces strict design guidelines that mandate single-column layouts, this option will ensure that no multi-column blocks are created.
Updated 3 months ago