Custom component, Need 4 Columns at a time when I drag
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...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.