grapesjs
grapesjs copied to clipboard
traits setting not work after reload
Hello @artf previous issue
Yes, you're right traits are there but you didn't read the my issues those I'm facing.
1. when you drag and drop a social element, to change the value you've to select element first after that parent of that. Direct element not selected. 2) Traits value not pre-selected on page load. 3) when you export it the facebook icon is not having the URL which we set.Please let me know how we can do that.
- This is because you're selecting your div wrapper and not the actual component, you can make not selectable:
<div data-js="social-icons" data-gjs-selectable="false"> ... - Trait's value is set from the component's model, so if you use
changePropthe value is insidecomponent.get(TRAIT_NAME)otherwisecomponent.getAttributes()[TRAIT_NAME] - The final code is built from the model, not from what YOU edit in canvas. When you trigger the method on
change:facebook_urland dofacebookUrl.href = facebook_urlyou're just updating the view and not the model of that element. Please read carefully here
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.