Duplicate component not style
Question
Hi,
First of all, thanks a lot for the awesome work ❤️ !!!
I've a question about the duplication tool so here the steps to follow :
- I drag&drop a text component
- I change the style (color in green, weight, size, etc...)
- I duplicate it
- I change the color in red BUT the original component changes in red too because they have the same class
==> So is this possible to duplicate a component (or block) with the same style/attributes but continue to edit the cloned component without impacting the original component ?
Thanks a lot in advance 🙏
Answers (3)
Hi @hpruvot I'd like to say, at first, if you clone a component with a class and you change it, you see changes on both, this is because how classes work. If you want to avoid the editor creating classes for you, use this option:
grapesjs.init({
...
forceClass: false,
})
Oh sorry I missed that option, thanks 👌
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 #906
[Question]How to change custom component content (html) from ajax?
Hi @artf, First of all thanks for this awesome plugin. Can you please let me know how i can update/change block content? I created custom b...
Issue #1793
[Bug]: Duplicate CKEditor Toolbar
hi @artf , Grapejs version: 0.14.52 Steps reproduce:Access the link: https://grapedrop.comLogin and go to template site.Edit one template.D...
Issue #1464
Customizing the Component Position
First of all thank you guys for this awesome library, And I have one Clarification that is how do i customize the drop position example if...
Issue #1739
How to load dynamic CSS style(Not Link) into the Canvas head
Hi, First of all thanks for your great Work !!!!! I am trying to load a dynamic style into the canvas head. Is there any way to load dynami...
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.