After installing grapesjs-style-bg plugin, how do I add it to StyleManager?
@pooriamo, thanks man! Life saver! It works great! :))) Thanks for the cheatssheet too, lots of goodies in there!
Read full answer below ↓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)
@pooriamo, thanks man! Life saver! It works great! :)))
Thanks for the cheatssheet too, lots of goodies in there!
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.
Issue #1524
Howto add Blocks?
Hello all, it turns me crazy but I do not understand how to add blocks. I can write them myself following tutorial, but when I load plugin,...
Issue #6152
CSS added via custom code persists after custom code component is removed
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link https://grapesj...
Issue #3639
[Feature]: Improve UndoManager API
One thing i think would add great functionality is a more detailed history stack. U can get the undo stack and build a sort of history repo...
Issue #4601
update() of custom types added to StyleManager is no more triggered when switching between some targets.
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chromium 104 Reproducible demo link https:...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.