grapesjs
grapesjs copied to clipboard
Remove attributes from a component
Hi @artf I don't know if it is possible to remove an attribute from a component. In our project I'm injecting a custom attribute from a custom trait that I created but there is an option to unselect this attribute so I would like to remove from the component.
I couldn't find the functionality on your code.
Thanks in advance
const attr = component.getAttributes();
delete attr.title;
component.setAttributes(attr);
@artf hi man!, can you say me some alternative to remove attributes?
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.