Problem adding trait to block #5257
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a problem, when trying to add a Trait, it does not appear when selecting the item. Do the traits have a plugin to install or are they already integrated? My code:
$this.objBlocksDefault['h1'] = {
label: 'Headline',
category: $this.strBlockText,
media:
<img src="/builder/svg/h1.svg" class='icon-tools' style="width:45px">
,resizable: true,
attributes: { class: '', title: "Adicione uma Headline" },
content:
<h1 class="" data-bold="inherit" data-gramm="false" style="display:flex; justify-content:center; align-items:center; padding: 0; margin: 5px 5px 10px 5px; text-align: center; box-sizing: border-box; font-size: 39px;width:100%;" data-gjs-resizable="true"> {{ text }} <!-- Este é o marcador de posição para o conteúdo --> </h1>
,traits: [ // Adicione os traits desejados neste array
{
type: 'content', // O tipo do trait é "content"
label: 'Texto', // Rótulo exibido para o trait no painel lateral
name: 'text', // Nome do trait, que será usado como marcador de posição no template do componente
placeholder: 'Headline 01', // Texto de placeholder para o campo de texto
},
// Adicione mais traits aqui, se necessário
]
};
Beta Was this translation helpful? Give feedback.
All reactions