Issue #1292πŸ’¬ AnsweredOpened July 17, 2018by ploutos271 reactions

Passing custom classes on components block..

Quick answerby ploutos27❀ 1

fixed:

Read full answer below ↓

Question

Hi there,

Components parameters are not allow us to pass a custom specific className, p.s: I don't want to pass the className inside the content....

.....
 blockManager: {
                   appendTo: '#blocks',
                   blocks: [{
                           id: 'header',
                           label: 'Header',
                           className: 'header',
                           content: {
                               tagName: 'app-header',
                               draggable: true,
                               components: [{
                                   tagName: 'div',
                                   content: 'This is the text inside ther header',
                               },{
                                   tagName: 'div',
                                   components: 'This is the main header',
                               }]
                           },
                           category: 'Headers',
                        }]
            },
......

Is there a way to do that ? Or we should build a plugin for that ?? Thanks !

Answers (2)

ploutos27β€’ July 19, 2018

fixed:

...
blockManager: {
    appendTo: '#blocks',
        blocks: [{
            id: 'container',
            label: '<div class="gjs-block-label">CONTAINER</div>',
            attributes: { class: 'gjs-fonts gjs-f-b1' },
            content: {
                classes: ['columns-row', 'is-desktop'],
                components: ``
            }
       }]
   } ...
lock[bot]β€’ September 17, 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.