Add Type for block and css with class name
and make yourself a favor, stop defining entire sections in blocks, use a component-oriented approach so your blocks will be mainly like this:
Read full answer below βQuestion
Hi @artf I am stuck on one thing I want to add one block in which I want to add style with the class name also Here is my code -: This give me the exact thing what I wanted like HTML-code in the HTML section and style part in the style section but I want to add a new trait for the same and how can I define type in this On the other hand when I define type and do something like this and add a new trait it's giving me the div tag and inline style as shown in the screenshot. Could you please help me on this Thanks If I will define content in component then how can I define the style with class n...
Answers (2)
and make yourself a favor, stop defining entire sections in blocks, use a component-oriented approach so your blocks will be mainly like this:
Thanks for reporting this, @Abhisheknanda1344463. Thanks for sharing your report about Add Type for block and css with class name. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your GrapesJS version number Browser and OS info...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3559
Page.getMainComponent().view gives undefined when page is selected
Hello @artf, I want to get the HTML Element of selected page. But it returns undefined when using following code:
Issue #3309
TextNodes interfere when changing content on element
Version: 0.16.44 Hi @artf I have a custom block with a custom button component, which its content is similar to this one. <a data-gjs-type=...
Issue #3512
Child elements not draggable ,droppable highlightable. also the CSS of all child elements not pushed in style section while develop a banner component in as plugin
Hello @artf , I am trying to develop a simple banner plugin which will be include a heading , subheading and link. and every element can be...
Issue #3446
Cannot Store Data Unexpected token '-'
Please Help Me, I Want To Store gjs data to mysql but i cannot get any data from front end to back end here my code: const editor = grapesj...
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 βBrowse Plugin Categories
Jump directly to plugin category pages on the marketplace.