Issue #2858Opened June 26, 2020by hellocaio3 reactions

[QUESTION] After installing grapesjs-style-bg plugin, how do I add it to StyleManager?

Question

Newbie question here, I added the plugin grapesjs-style-bg to the stack, now how to I show it in my StyleManager?

I reset all the sectors from the StyleManager on initialization, and then I add them one by one using styleManager.addSector("id", {...}).

Answers (2)

hellocaioJune 28, 20202 reactions

@pooriamo, thanks man! Life saver! It works great! :)))

Thanks for the cheatssheet too, lots of goodies in there!

pooriamoJune 27, 20201 reactions

You can cheat from here: https://github.com/artf/grapesjs/blob/gh-pages/demo.html#L1127

You must add background-bg to the buildProps array and then config it in properties, the type must be bg:

[
    ...
    {
        name: 'Decorations',
        open: false,
        buildProps: ['opacity', 'border-radius', 'border', 'box-shadow', 'background-bg'],
        properties: [
            ...
            {
                id: 'background-bg',
                property: 'background',
                type: 'bg',
            }
        ]
        ...
    }
]

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.