Elxis CMS Forum
		Support => Elxis 4.x/5.x DEV => Topic started by: seadhna on September 20, 2017, 10:49:12
		
			
			- 
				Hi datahell,
 I've just done a fresh installation of the latest version, but I notice that the CKeditor is rewriting every <br /> as a space when I save an article.
- 
				Hello,
 Do you write articles using source code or once you need new line break you type
 shift+enter? Have you tried <br> instead of <br />?
- 
				Hi, yes, I write using source. If I type <br> or <br /> and click 'Apply', it is replaced with  
			
- 
				Yes, the editor does some similar replacements if the HTML is invalid or depending on its configuration.
 
 Tip: use <br /> instead of <br/>
 note the space after "r".
 
- 
				Hi datahell,
 I am writing <br /> with the space. It is getting rewritten when I click 'save' as  
 Note, this happens only in the default language I have noticed today. It does not happen in secondary languages.
- 
				Also: If I type <br /> outside of any parent element, it gets rewritten by the CMS as  
 If I type <br /> inside of a parent element, e.g. <div> or <p>, it simply disappears.
- 
				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.
			
- 
				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.
			
- 
				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.
- 
				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"> </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.