Something is wrong about blocks #5224
Replies: 1 comment
-
Hi @bablilayoub , not sure if this helps but I apply classes to my custom components via the attributes property. |
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.
-
hi i found a problem in this case , so when i add block like that for example :
editor.BlockManager.add('text', { label: 'Text', content: { type: 'text', content: 'Insert your text here', activeOnRender: 1, tagName: 'p', } });
The code works just find and when i export the template the element is exported like this :
<p id="izk2b">Insert your text here</p>
to now everything is fine , but when i add block on this way :
editor.BlockManager.add('text', { label: 'Text', content: { type: 'text', content: 'Insert your text here', activeOnRender: 1, tagName: 'p', classes: ['text-base'], } });
the results of export template of the element returns this :
<p class="text-base">Insert your text here</p>
in this case there is no id which causes a problem when changing styles of element after duplicating the element , because css is being applied on the class not id which means that the both element are going to change when changing styles of one of them , so the problem in short , i just need the id to applied when add class to block
Beta Was this translation helpful? Give feedback.
All reactions