Add Trait For wrapper
Question
Hi @artf
I've added trait for wrapper this way.
How can I perform the init function for the same
Here is the code
editor.getWrapper().set('traits',
[
{
changeProp: 1,
name: 'abc',
label: 'abc',
type: 'checkbox',
changeProp: 1
},
],
)
@artf Could you please help me? Thanks.
Answers (3)
You can use this option from components on init https://github.com/artf/grapesjs/blob/69e5ab2c1176e6fdeac1b058398cca55efe92df3/src/dom_components/config/config.js#L9
PS: stop annoying other people with your issues, please or I have to block you from this repo
Sorry @artf I'll keep this in mind. Thanks
@ryandeba Any suggestion?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1779
Traits type Checkbox not checked from the initialization of the Component type.
Hi, Artur When I try to check traits (type: checkbox) from the init() of the domCom Type the value set as true but not checked. Code: Thank...
Issue #3228
Component Value is not changing
Hi @artf I've added a new component here is the code on selecting the h1 and h2 tag it's changing the value in the HTML section as you can...
Issue #718
Add Description to trait
Is there way to add description to trait? we have below trait and want to add description so user understand what is purpose of it. traits:...
Issue #3225
How to Update Style from checkbox Trait?
Hi @artf I am trying to update the style using the checkbox trait but it's not calling the function. Here is the code I really appreciate a...
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.