Disable/change build-in components behavior
@JoeriAben did you try this? https://grapesjs.com/docs/modules/Components.html#improvement-over-addtype
Read full answer below ↓Question
Hey,
Trying to get GrapesJs work for a project I'm currently working on. But is there a way to disable the built-in components that convert div & span into editable components (or change the isComponent so I can add a class/data flag). Because I don't want all div's & span's editable only the ones I say need to be editable with a data-gjs flag.
Hopefully, someone can point me in the right direction.
Kind regards,
Joeri
Answers (3)
@JoeriAben did you try this? https://grapesjs.com/docs/modules/Components.html#improvement-over-addtype
Create a custom text-editable component by extending the text one. Then extend the text component by setting editable to false.
Now in your template use data-gjs-type="text-editable"
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1841
Components name
I have two questions.Is there any way to change the built-in components name? I wanted to change the name "Box" to "Div". so the same name...
Issue #1953
[QUESTIONS] render without iframe or get global styles and scritps
Hello, I am trying to integrate grapesjs in prestashop, but due to the iframe, I do not get the global css or js. I tried to enter the css...
Issue #1485
How to prevent styling html components?
Im trying to create some templates, which should not be editable and styleable. So that when i drag in my blocks then should stay as define...
Issue #1113
[QUESTIONS] New trait type is not working with rendered components?
Hello, thanks for the great framework. I'm trying to apply this to my project. I want to add a new trait for existing LINK '<a>' component....
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.