how to create traits for textcomponent and label component? #4331
Unanswered
senthil177cse
asked this question in
Q&A
Replies: 1 comment
-
Hello, have you checked the forms plugin? Many of features i have to add in my project i found in his plugins. https://github.com/artf/grapesjs-plugin-forms/blob/master/src/components.js#L299 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i have tried to add new trait of text and label component but it is not adding... but same method i have tried for image and input component its added? pls check below code and explain why its not adding or anything wrong pls correct me?
this.editor.Components.addType('text', {
isComponent: el => el.tagName == 'p',
model: {
defaults: {
traits: [
{
type:'checkbox',
name: 'visibility'
}
]
}
}
});
Beta Was this translation helpful? Give feedback.
All reactions