I’ve been messing with this all day, here’s some more details:
Using bootstrap 3 on my own site and using the live demo sitecake site, I have the following inside of a bootstrap container:
<p class="myclass1"><a class="myclass2" href="something.html"> text </a></p
which sitecake.php sees as
<div class="sc-content sc-content-_cnt_11163969031964445442">
<p class="myclass1"><a class="myclass2" href="sitecake.php?page=something.html"> text </a></p>
but when published becomes
<p><a href="sitecake.php?page=something.html"> text </a></p>
Two things interesting there:
- The classes of the p and a tags are removed
- Indentation is removed (maybe a hint as to what’s going on?)
I’ve come up with this workaround that works for a the columns in the live demo:
<div class="col-md-12 sc-content">
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
Good: this allows you to edit the text without messing up the buttons.
Bad: this adds extra margins which you’ll have to cancel out with another class or manually with a style. What it is doing is placing another column inside the existing column, and making the new column 12 (i.e., 100%) wide.
Ideally, it woudl be best if If there was some way for sitecake to preserve classes while still enabling editing of of the text of the element – especially for bootstrap where this will be very common. For my needs, I can use this workaround for now.
And thank you, this is an AMAZING project!