|
When i was use grapesjs v 0.16.* i can do [styles.ts] const sm = editor.StyleManager;
sm.getSectors().reset([
{
name: 'General',
buildProps: ['display', 'position', 'vertical-align', 'float', 'top', 'bottom', 'left', 'right', 'overflow-x', 'overflow-y'],
properties:[...]
},
]);but with the latest version the default StyleManager Sectors are still there. edit: import type grapesjs from 'grapesjs';
import components from './components';
import blocks from './blocks';
import styles from './styles';
...
const plugin: grapesjs.Plugin<PluginOptions> = (editor, opts: Partial<PluginOptions> = {}) => {
...
// Load components
components(editor, config);
// Load blocks
blocks(editor, config);
// Load styles
styles(editor, config);
} |
Answered by
artf
Oct 21, 2022
Replies: 1 comment 1 reply
|
Try to move the update once the editor is ready. editor.onReady(() => {
editor.StyleManager.getSectors().reset([...]);
}); |
1 reply
Answer selected by
hyuuks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try to move the update once the editor is ready.