GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.38k stars 4.06k forks source link

[QUESTIONS] Devices panel appendTo #1450

Closed besingamkb closed 6 years ago

besingamkb commented 6 years ago

Hi Everyone.

I manage to redesign the grapesjs editor by using appendTo on the styleManager, layerManager and blockManager on its own division. I also use the grapesjs-preset-newsletter. But the device panel is still stick on the editor workspace. screenshot_21

Is it possible to append on its own division? and I also notice. Some buttons is not showing. screenshot_22

I guess those buttons just not appended? im not sure. Can I also use appendTo option to append it to its own division? Please see my code below.

var editor = grapesjs.init({
    container: '#gjs2',
    height: '500px',
    fromElement: true,
    storageManager: {type: 0},
    plugins: ['gjs-preset-newsletter'],
    layerManager: {
        appendTo: '#layers-container'
    },

    blockManager: {
        appendTo: '#blocks'
    },

    styleManager: {
        appendTo: '#style-manager-container'
    },

    selectorManager: {
        appendTo: '#selectors-container'
    },

    traitManager: {
        appendTo: '#traits-container'
    },

    panels: {
        defaults: [{
            id: 'layers',
            el: '#layers',
            resizable: {
                tc: 0,
                cr: 1,
                bc: 0,
                keyWidth: ''
            }
        },

            {
                id: 'styles',
                el: '#style-manager',
                resizable: {
                    tc: 0,
                    cr: 0,
                    cl: 1,
                    bc: 0,
                    keyWidth: ''
                }
            }]
    }
});

I base on the codepen example by the author.

Thank you guys. I hope someone can help me on this.

artf commented 6 years ago

Device buttons are inserted by grapesjs-preset-newsletter, you have to move them on load via JS

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.