Is it possible that I change value in traits that will directly reflected in component?
Question
Like If I created drop-down in traits and with a select value of dropdown I want to change the text that is present in that component without reloading or dragging that component again.
Answers (3)
ok, what about editor.setComponents('<div>...</div>')?
This is how traits should work. When you update the value of the trait that change is reflected up to the component (example of input type in select component https://github.com/artf/grapesjs-plugin-forms/blob/master/src/components.js#L70-L78)
Let's say I made custom component and add that to grapes editor then I want to change body(You can say whole HTML/CSS) of that component using selected value in the drop-down from traits. Is it possible?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1639
[Question]: Would it be possible to have change settings under style manager in a way that it has href when a link is created?
I'm using preset newsletter with built-in RTE (do not want to use ck editor like the demo) In order to make any text to link, i need to cli...
Issue #1951
[QUESTIONS] change or add event on add component from block
is it possible ?, change the drag and drop event to on click when adding a new component, I want to add components by clicking the block th...
Issue #518
change only component body not whole page body.
Hello @artf As we discussed in issue #374. setComponents will set the body and replace all the contents that are present on the page with a...
Issue #996
[QUESTIONS] change attribute value that is generated through trait
Now, let's consider that I wrote new into the trait value but in attribute :items, I want to append prefix like item.text. to that value So...
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.