Support > Elxis 4.x/5.x DEV

Latest version of Elxis rewriting <br /> as &nbsp;

<< < (2/2)

seadhna:
Also: If I type <br /> outside of any parent element, it gets rewritten by the CMS as &nbsp;
If I type <br /> inside of a parent element, e.g. <div> or <p>, it simply disappears.

seadhna:
Actually, it happens for other languages too. If I type <br /> and click the save-disk for that language, it's ok, but when I click the main 'apply' or 'save' button, it disappears.

datahell:
break is an old-fashioned tag and the editor makes some replacements but this depends where you have put it. If you insert it inside a paragraph tag it will stay intact. If you put it outside a paragraph it will be replaced by an empty paragraph because it is not good to use breaks for space. If you want to add down space use css margins instead.

seadhna:
Hi datahell,
<br /> is not an 'old-fashioned' tag! It is a critical tag, required and the most correct tag in multiple situations.
It is perfectly valid and it's removal by the Elxis CMS is a bug, not a validation.
Please understand it is not being replaced by an empty paragraph, it is being removed and not replaced with anything! This makes the CMS unusable for my purposes.

seadhna:
Here is an example of why I need <br /> outside of a <p> tag:

I have two headings, they must be "display:inline" in order to feature a 50% opacity background shading and have the necessary 'padding' left and right of a mult-line heading. (There are numerous browser issues relating to making this possible, and 'display:inline' is the best solution at present. More available on this here: https://css-tricks.com/multi-line-padded-text/).

<h1 class="with-bg">Malawi:</h1>
<br />
<h2 class="with-bg">Building Resilient Systems for Food and Nutrition</h2>

The thing is: These headings, semantically, are the same heading. To overcome the current issue with Elxis, I must style a <p> class with zero height thus:

<h1 class="with-bg">Malawi:</h1>
<p class="line-break">&nbsp;</p>
<h2 class="with-bg">Building Resilient Systems for Food and Nutrition</h2>

However, this is not as elegant and semantically incorrect, because these two headings are in fact part of a same overall heading and should not be divided by a paragraph, merely a line-break.

Navigation

[0] Message Index

[*] Previous page

Go to full version