RichEditor Behavior

When I insert an horizontal rule (hr) using the RichEditor, it adds automatically
a new paragraph and a br after. Of course I dont need it in that case and it creates unwanted space after the rule.

Is there a way to disbale that behavior somehow or at least hide the html with css?

I tried this but its not working:

hr ~ p + br:first-child() {
    display: none;

thanks for your answer @virginiamendoza

I am not sure I understand your process.
I just click on the hr icon to crate a horizontal rule, then the editor creates the rule and add a paragraph with a br inside.
if I try to delete the paragraph or the br, it actually deletes also the horizontal rule.

The editor has to add this so it is possible to include text below it. You could trim the content, or indeed hide it with CSS.

it is a tailor richeditor field, could I trim the content in some sort of afterSave event?

1 Like