Passing custom classes on components block..
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)
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: ``
}
}]
} ...
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.
Issue #792
Script property using function don't work with blocks
In Components & JS docs there's this example: This works perfectly. But I couldn't use a function instead of a string in script, as is said...
Issue #1965
Custom content type
@artf Instead of using plugins js files, can we create our own content using html as I have done below. Is it a correct way to do it? Sorry...
Issue #494
Place block as component programmatically
I've created a custom type, and a block is it possible to insert it into DomComponents by name or any other means? I don't want to be drag'...
Issue #1325
How to disable drop for specific blocks/components
Hello, with the following code we are able to indicate if it's possible to drop other component(blocks) inside that particular component......
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.