traits setting not work after reload
Question
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.
Answers (2)
- 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.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1629
Grapesjs- When i drag and drop the video into the canvas, i want it to be selected on Component Setting right away
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grape...
Issue #1247
Text disappear after creating a new type
Hello! I am creating a new block that will open a modal during the creation (drag and drop https://github.com/artf/grapesjs/issues/174 real...
Issue #980
[BUG] Related with task https://github.com/artf/grapesjs/issues/873
Hello, After restoring editor from db still have some part of bug present. It seems inside of script: function () traits will have old valu...
Issue #1908
[question] Cannot read property 'indexOf' of undefined
I found a previous result here: https://github.com/artf/grapesjs/issues/1772 however I can still not get it to work, using the most basic s...
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.