How to clone/copy a selected component with all its styles/css rules same as core:copy and core:paste command does, but I want json so that I can use it to create a block? #5158
Unanswered
FaisalShaikhHA
asked this question in
Q&A
Replies: 2 comments 2 replies
-
@artf please provide suggestions if any thank you |
Beta Was this translation helpful? Give feedback.
0 replies
-
@FaisalShaikhHA Hello, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to clone/copy a component with all its CSS rule, the same way
core:copy
andcore:paste
command does.paste command generates a new id for the component and updates the rules with the new component id as well, but I am not able to achieve the same thing for Styles/CSS rules.
component.clone()
command clones the component object but CSS rule objects are not cloned.If any other approach for cloning the component with all its child, CSS rules and then using the end result object to be used as a block please let me know. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions