richTextEditor uses <p></p> for "New line"

Hello,

How can I prevent richTextEditor to use

for a new line? This adds two empty lines in my email.

Thank you! :pray:

Btw, the richTextEditor needs some love. I does not have many options to set :sweat_smile:

1 Like

Hey @PatrickMast! Agreed that the Rich Text Editor could use some love :sweat_smile: we have a number of requests from folks about it. It doesn't look like there's a way to change how newlines are handled at the moment. You might be able to do some manual text replacement though. Does the following code work?

richTextEditor1.value.replace(/<p>(.*?)<\/p>/g, "$1\n")

+1

1 Like