Add read-only trait for all controls
Create your own trait https://grapesjs.com/docs/modules/Traits.html
Read full answer below βQuestion
We are using grapejs to create webpages. We are doing some back end manipulation of the json to link each child of the html (usually a row) to a record in our database. To that end, I've added a trait to every component called custompk. Upon saving the grapejs, I loop through the first level of components and add a record. Then I update the custompk with the primary key of the record in the database. The json has the appropriate trait and the html shows the custompk that I need. The last thing I'd like to do is to make the custompk trait read only while looking at the page through grapejs. Si...
Answers (2)
Create your own trait https://grapesjs.com/docs/modules/Traits.html
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 #1888
Add custom html inside canvas
Hi there, I'm using grapes to export a custom json with all the information i need, instead of HTML and CSS. For doing that I'm parsing the...
Issue #1875
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 #1966
Loop over all components
Hi all, I want to create a socket for every button that I add to the canvas. This is working just fine. However, when I reload (using stora...
Issue #1897
View vs code
Hello...and sorry for my english! First of all, congratulations for this fantastic framework. I'm trying to use GrapeJS to create my own wo...
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.