[QUESTION] Unique ID on block content without inline style
See original GitHub issueHi All,
I made a custom block manager element, but when the element is edited, it applies the style to the class, which means all the same elements are also impacted. If I set an inline style to the element, it then applies the style to the custom class / ID.
Without in line style:
Code:
editor.BlockManager.add('column_1', {
label: 'Column 1',
category: 'Basic',
content: `
<div class="row gjs-row">
<div class='col-md-12 gjs-column'>
</div>
</div>`
});
With inline style:
Code:
editor.BlockManager.add('column_1', {
label: 'Column 1',
category: 'Basic',
content: `
<div class="row gjs-row" ${row_style}>
<div class='col-md-12 gjs-column' ${column_style}>
</div>
</div>`
});
Is it possible to force the style manager (my be the wrong name) to create the custom ID / Class and then apply the style to that? Instead of amending the noncustom class?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Inline elements - HTML: HyperText Markup Language | MDN
In this article, we'll examine HTML inline-level elements and how they differ from block-level elements.
Read more >Using CSS :before and :after pseudo-elements with inline CSS?
I came here looking for how to apply pseudo selectors in inline CSS and this answer showed me another way to achieve the...
Read more >Inline Styles in HTML - Codecademy
This problem can be created with any CSS, not just inline styles, but it is worth mentioning here. Always look for the right...
Read more >HTML Block and Inline Elements - W3Schools
There are two display values: block and inline. ... The <div> element has no required attributes, but style , class and id are...
Read more >Style Sheets in HTML documents - W3C
Setting the default style sheet language; Inline style information ... declaration block syntax described in section 4.1.8 (without curly brace delimiters).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pouyamiralayi
My bad - worked it out, I had some old ‘CssComposer.setRule’ still hanging about!!! (since I had debug enabled on my development pc) That was appending the .row class. (That is embarrassing)
Thanks for the point in the right direction regarding the selector ‘private: false’ - it’s working a treat 😃 - keep uncovering more and more of this amazing project.
Case closed! 😃
@adamwpe can you confirm that by deactivating
row
selector:active:false
in theadd:selector
event, you are still receiving the selector?