Issue #2838Opened June 18, 2020by levansuper1 reactions

Style sections are duplicated

Question

Hello Guys

I'm using: "grapesjs": "0.16.12", "grapesjs-preset-webpage": "0.1.11",

and in the css edit area i get this strange behavior: <img width="1527" alt="Screen Shot 2020-06-19 at 00 39 13" src="https://user-images.githubusercontent.com/223112/85069933-01cbdd00-b1c6-11ea-909b-7b77a048eefe.png"> a lot of the sections are duplicated!

this is the repository with my code: https://github.com/levansuper/grapes

Answers (3)

levansuperJune 23, 20201 reactions

@artf in my case the problem was that i was loading the module using node not directly in html. In the end I found and answer:

import gjsPresetWebpage from "grapesjs-preset-webpage";
bla, bla, bla...
GrapesJS.init({
...
plugins: [gjsPresetWebpage],
pluginsOpts: {
    [gjsPresetWebpage]: {
        customStyleManager: [{
            name: 'General2',
            open: false,
            buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom']
        }]
    }
})
etamityApril 29, 20210 reactions

@artf in my case the problem was that i was loading the module using node not directly in html. In the end I found and answer:

import gjsPresetWebpage from "grapesjs-preset-webpage";
bla, bla, bla...
GrapesJS.init({
...
plugins: [gjsPresetWebpage],
pluginsOpts: {
    [gjsPresetWebpage]: {
        customStyleManager: [{
            name: 'General2',
            open: false,
            buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom']
        }]
    }
})

I found out if you pass styleManager: { clearProperties: 1 } to GrapesJS also will resovle the problem

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.