Closed Abhisheknanda1344463 closed 3 years ago
@ryandeba Any suggestion?
@artf Could you please help me here?
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
@artf i've manage to add trait for wrapper how could i peform init function for trait Not getting the exact way
var editor = grapesjs.init({
domComponents: {
wrapper: {
removable: false,
copyable: false,
draggable: false,
components: [],
traits: [
{
name: 'abc',
type: 'checkbox',
label: 'abc',
changeProp: 1,
},
],
init(){
this.on('change:abc', this.abc);
},
updateScroll(){
alert("jo");
},
stylable: [
'background',
'background-color',
'background-image',
'background-repeat',
'background-attachment',
'background-position',
'background-size'
],
},
}
});
domComponents.wrapper
is only for props... You can always extend the wrapper
component
Hi @artf
I've added trait for wrapper this way. How can I perform the init function for the same Here is the code
@artf Could you please help me? Thanks.