Issue #526💬 AnsweredOpened November 15, 2017by matiponce910 reactions

New feature

快速解答by artf

Just check here https://github.com/artf/grapesjs/issues/499 :)

Read full answer below ↓

Question

Hi Arthur, I have developed a new feature that is the possibility to add tabs inside blocks panel (this is optional what it means that if you don't add any tab, blocks panel will continue behaving as before) and these tab could have their own categories and blocks. My question is if would be possible to add this feature in core GrapesJs due to I had to develop a brand new manager called TabManager. In case it would be only possible to add as a plugin, how can I add this new manager?

The idea is that doing

tabManager:{
    default : 'content',
    tabs: [{
        id: 'tab1',
        label: 'Tab 1',
        attributes: { class:'gjs-fonts gjs-f-b1' }
    },{
        id: 'tab2',
        label: 'Tab 2',
        attributes: { class:'gjs-fonts gjs-f-b1' }
    }]
}

And adding the tab id inside block definition as below:

label: 'Block',
category: 'Basic',
tab: 'tab1',
attributes: { class:'gjs-fonts gjs-f-b1' },
content: `<div style="padding-top:50px; padding-bottom:50px; text-align:center">Test block</div>`

We get the following result: captura de pantalla 2017-11-15 a la s 10 47 16

If we switch to the other tab you can see the result: captura de pantalla 2017-11-15 a la s 10 56 11

Answers (2)

lock[bot]September 18, 2019

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.

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.