Edit+ editor removes <BR> and empty <P> tags


#1

Matrix Version: 5.3.4.0

For some reason in the WYSIWYG editor, anytime you hit enter or shift enter to create some line breaks, Matrix just deletes those tags when you save the page. Is there anyway to stop this behaviour in the WYSIWYG editor besides converting the content container to a RAW HTML box?


(Douglas (@finnatic at @waikato)) #2

I’ve seen it suggested elsewhere (forums or squizmap) that you can add a redundant class attribute and they’ll survive.


(Bart Banda) #3

Yea I think this is default behaviour of the Viper WYSIWYG editor. I’ve asked the Viper developers if there is a way to turn that off using a setting or something, but they said there isn’t. I think the reason they want them removed is so that users don’t incorrectly create incorrect HTML structures for their content.

I can see the point of removing empty p tags, but I think br tags have an argument for not always needing to be removed.

But yea, like Douglas said, you should be able to select an empty p tag and apply a custom class to it that has a bottom margin on it or something, which if the editor detects a class or attribute on the empty p tag, it won’t strip it.