I managed to get accordions, tabs, carousels and even a reliable flexbox working using the Generico filter plugin.
I didn't use the default accordion supplied in Generico as it's not a bootstrap one, so I've had to create two templates: a container and a card.
Container:
Body template:
<div id="@@AUTOID@@" role="tablist" aria-multiselectable="false">
End tag:
</div>
Custom JS:
$(document).ready(function(){
$('.collapse').on('show.bs.collapse', function (e) {
$('.collapse').collapse("hide")
})
})
Card:
Body:
<div class="card genericoCard">
<div class="card-header" role="tab" id="@@AUTOID@@">
<h5 class="mb-0" style="margin-bottom:0px">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse@@AUTOID@@" aria-expanded="true" aria-controls="collapse@@AUTOID@@"><span class="fa" aria-hidden="true"></span>
@@heading@@
</a>
</h5>
</div>
<div id="collapse@@AUTOID@@" class="collapse show" role="tabpanel" aria-labelledby="heading@@AUTOID@@">
<div class="card-block">
End:
</div>
</div>
</div>
Custom JS:
// This removes any stray <br> tags at the top of the accordion. Probably should be expanded to remove empty <p> elements
if($('.genericoCard').next().is('br')) { $('.genericoCard').next().remove(); }
Custom CSS:
.genericoCard { border: #ddd 1px solid; margin-bottom: 0; }
.genericoCard [data-toggle="collapse"] span:before{ content: "\f139"; }
.genericoCard [data-toggle="collapse"].collapsed span:before{ content: "\f13a"; }
Once this is set up, you insert a container element and inside add as many cards as you need. Looks a little messy in the editor, but is much easier than trying to manually code them in Atto.