Skip to content
Discussion options

You must be logged in to vote

@PallobST https://grapesjs.com/docs/modules/Traits.html#add-traits-to-components

Move traits part to model/defaults:

        model: {
            defaults: {
                tagName: 'p',
                content: 'This is a text',
                traits: [
                  {
                    type: 'custom-text', // Trait type
                    name: 'Text', // Trait name
                    label: 'Text', // Label displayed in the traits panel
                  },
                ],
            },
        },

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PallobST
Comment options

Answer selected by PallobST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants