How to modify the content of the added block
Question
sorry,I created a type for button and I don't know how to change the content of the button.thanks so much!!

Answers (2)
Hey @ionic666 ,
as it's stated in the documentation for the components. Turn off autorender when adding new types of component and call it manually after you declare them.
You can change the content of an component extending the view of the defaultModel inside the render function. There are two possibilities:
- Change the model --> This will affect the final HTML code
- Change the DOM element --> This doesn't affect the final HTML code just the view.
All of the above can be found in the provided GrapesJS docs.
Have a great day. :)
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 #1205
create block for charts
hi,First of all, I wish you a happy life.i have created a block for charts like: I don't know how to get chart from my block.Global variabl...
Issue #1171
how to change the content
hi ,Thank you for your advice on the previous question.but when i change the content ,there will be a extra table.can you tell me which met...
Issue #1237
Before you drag and drop the image,there was nothing in assetManager
and I don't know how to set the backgroundImage
Issue #1723
[QUESTION] replacing particular text in dropped component
Hi, I get the value from custom traits from what I entered but I don't know how to change the particular value in dropped component and ren...
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.