Custom component, Need 4 Columns at a time when I drag
@PKRekha you can prevent the styling by setting `stylable property to false` and for having 4 instances of your component type, just go like this: Cheers!
Read full answer below ↓Question
Hello @artf, I have created custom component, where I need to display 4 columns with specific style when I drag a component to the canvas and in each column again I have some html content with specific styles and again i have to give user to edit the content or image but not the styles. Can I have a example where anybody does this kind of functionality? as of now I have created a custom type for a column and static content with in the column, but I am stuck with remaining functionalities. please help to achieve this
Answers (3)
@PKRekha you can prevent the styling by setting stylable property to false and for having 4 instances of your component type, just go like this:
const bm = editor.BlockManager;
bm.add('COLUMN', {
label:'Column',
content:`
<div data-gjs-type="column-type"></div>
<div data-gjs-type="column-type"></div>
<div data-gjs-type="column-type"></div>
<div data-gjs-type="column-type"></div>
`
})
Cheers!
Please adjust title and follow the contents of the issue template
Hello @artf , I have created custom component, where I need to display 4 columns with specific style when I drag a component to the canvas and in each column again I have some html content with specific styles and again i have to give user to edit the content or image but not the styles. Can I have a example where anybody does this kind of functionality? as of now I have created a custom type for a column and static content with in the column, but I am stuck with remaining functionalities. please help to achieve this
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2952
Custom component is not working after saving.
Hi, I have Button-Link custom component created, and when I dragged into canvas for the first time component is detecting its attributes an...
Issue #2777
[QUESTION] How to update styles in Style Manager
Hello. I created custom component where I set backgraound-image via custom asset manager Custom block code: Command which I run to set new...
Issue #1875
[QUESTION] ID changes when importing html or passing html in components prop in config.
Hi, I built a component and block that I can drag and drop in the canvas. My issue is that some styles rely on the ID. I know this might no...
Issue #1893
[QUESTION] Have to have all the blocks the same styles by definition
We are using blockManager, as you can see in the example posted to codesandbox, following the documentation related to custom render. The u...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline — both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.