NO BUG: Cannot add empty span to rich text

Browser: Chrome
OS: Windows

I can no longer add an empty span to the rich text, since it auto deletes it.
I used this before with a simple class, where the custom css was in this class.

%root% span {
 some css
}

I could then easily add styling to the text element via a bricks class.

Now,

  • if I add a < span > in html, it deletes it.
  • If the span has a class, it will remain in place.

Steps to reproduce:

Image 1: Add text to a rich text element and use some enters.

Image 2: Add an empty span tag in the text:

Image 3: Your on screen text now loses the paragraph styling:

Image 4: look at the plain text again, you’ll see the span is automatically deleted:

Image 5: Now do the same with a class in the span, and the span will stay:
image

1 Like

Hi Michael,
Thanks so much for your report!

When you say that…

…until when were you able to do this?

Since TinyMCE already did this over 10 years ago, I don’t assume that this is a Bricks bug :thinking:

Best regards,
timmse

1 Like

Hi Timmse,

You are absolutely right!

I rechecked it.
But the spans were set in:

  • Basic text elements
  • Headers

Where they work fine. So this is indeed no bug from Bricks but a mistake from my end.
Really sorry for your time on this and thanks for the link!

1 Like

Did you solved this? I looked at the stackoverflow discussion, but I am not sure what is the fix… THanks.

@timmse is your Rich Text using the default config of Wordpress and it is enough to modify the tinymce.init via tiny_mce_before_init or do you have something dedicated for Bricks that requires a different filter?

Not that I’m aware of: