How to extend the existing traits and render the changes in canvas?
You don't need to update the view in this case, just change the classes inside the model. All you need is this
Read full answer below ↓Question
I am trying to write a plugin to manage all the element properties of Boostrap Blocks. If someone clicks on the button it will show button related properties like button colors, size, etc... (based on default bootstrap classes) The following code - modifies the button classes and settings got stored in the model however I don't how to actually render the changes properly. Here's my code:
Answers (2)
You don't need to update the view in this case, just change the classes inside the model. All you need is this
doStuff() {
this.setClass(this.get('classProp'));
},
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 #1959
[Question] Edit innerHTML in a custom button
Hi All, I am trying to change the text in a button component, but I am not able to edit it. I added this type: I included the editable: tru...
Issue #1524
Howto add Blocks?
Hello all, it turns me crazy but I do not understand how to add blocks. I can write them myself following tutorial, but when I load plugin,...
Issue #1864
[QUESTION] Best way to listen to changes on the final HTML?
Hi, I just had a quick question because I could not figure out how to do it or did not find an issue related to it. I am just trying to cal...
Issue #1850
[QUESTION] How to show blocks under different tabs
Hello @artf , Hope you are doing fine. I was trying to show all the blocks under different tabs. For example: displaying sections, columns...
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.