Browse Source

Update Style Manager doc

up-style-manager
Artur Arseniev 5 years ago
parent
commit
ef19b2e829
  1. 23
      docs/modules/Style-manager.md

23
docs/modules/Style-manager.md

@ -450,7 +450,28 @@ For a more advanced usage you can rely on the [Style Manager API] to perform dif
// Update selected targets with a custom style
sm.addStyleTargets({ color: 'red' });
```
* Adding new built-in property definitions.
* Adding/extending built-in property definitions.
```js
const myPlugin = (editor) => {
editor.StyleManager.addBuiltIn('new-prop', {
type: 'number',
label: 'New prop',
})
};
grapesjs.init({
// ...
plugins: [myPlugin],
styleManager: {
sectors: [
{
name: 'My sector',
properties: [ 'new-prop', ... ],
},
],
},
})
```
* Adding new types.

Loading…
Cancel
Save