Online Consultant

Tips
Get tips on here for your website, related to all UWB software versions
Subscribe to new posts
Post Icon
TinyMCE Removing Empty <span> Elements - How to Fix

I was trying to create a modern browser mockup in TinyMCE with three colored circles like this:

Code: Please login/register for access

…but TinyMCE kept removing the empty Code: Please login/register for access elements.

The issue: TinyMCE automatically strips empty inline elements, even if they have classes. There’s no config option to allow truly empty spans globally.

✅ The reliable fix is to make each span non-empty, but without showing any visible text. Use a zero-width space (Code: Please login/register for access) like this:

Code: Please login/register for access

  • Code: Please login/register for access is invisible, so your CSS circles still render.
  • TinyMCE now sees the span as non-empty, so it won’t strip it.

This is the standard approach for decorative elements in TinyMCE.

You can check out the finished product on our homepage :-)

Official UWB Support Team! Contact us directly here!

Similar Topics
 
Topic / Topic Starter
Rating
Last Post
Replies
Views
Forum
Post Icon
-
Post Icon
Re: WordPress too hard, making sure UltimateWB has the features I need
5 years ago
4
136020
Post Icon
5.00 Rating, 1 Review5.00 Rating, 1 Review5.00 Rating, 1 Review5.00 Rating, 1 Review5.00 Rating, 1 Review
Post Icon
Awesome Ultimate Web Builder 8.1-8.4 Updates — Faster, More Accessible, and User-Friendly!
8 months ago
0
41811
Post Icon
-
Post Icon
Re: E-commerce website, website builder and web design help
9 years ago
1
119267
Post Icon
-
Post Icon
Re: Questions on publishing
9 years ago
3
88341
Post Icon
-
Post Icon
Re: E-commerce app: count sales for products without inventory count
By: 
Denzel
8 years ago
2
32898
Report forum post by:
Report a concern
Comments: