Hi there,
I’m having a strange issue with the <a class>
and <span class>
codes disappearing from text editor when switching to visual. I was trying to implement a simple flexbox container on a post with a link on each block but the following line of code always disappears: "<a class="wrapping-link" href="https://thecodeteam.com/projects/rex-ray/"></a>"
and the <span class="centered project-image-bg rex-ray-image"></span>
when switching back.
Tried to deactivate all plugins already but the issue still appears so I’m wondering if it’s some kind of security feature of the theme that’s preventing this type of code.
Here’s the full example:
<div class="container">
<div class="grid-row">
<div class="grid-item">
<a class="wrapping-link" href="https://thecodeteam.com/projects/rex-ray/"></a>
<div class="grid-item-wrapper">
<div class="grid-item-container">
<div class="grid-image-top rex-ray">
<span class="centered project-image-bg rex-ray-image"></span>
</div>
<div class="grid-item-content">
<span class="item-title">REX-Ray</span>
<span class="item-category">Infrastructure as Code</span>
<span class="item-excerpt">REX-Ray is a container storage orchestration engine enabling persistence fo...</span>
<span class="more-info">View Project <i class="fas fa-long-arrow-alt-right"></i></span>
</div>
</div>
</div>
</div>
</div>
</div>
After changing to visual editor and back to text editor it looks like this:
<div class="container">
<div class="grid-row">
<div class="grid-item">
<div class="grid-item-wrapper">
<div class="grid-item-container">
<div class="grid-image-top rex-ray"></div>
<div class="grid-item-content"><span class="item-title">REX-Ray</span>
<span class="item-category">Infrastructure as Code</span>
<span class="item-excerpt">REX-Ray is a container storage orchestration engine enabling persistence fo...</span>
<span class="more-info">View Project <i class="fas fa-long-arrow-alt-right"></i></span></div>
</div>
</div>
</div>
</div>
</div>
Strange that some span class elements remain while others disappear. This is quite frustrating since I need to check back on visual editor if all images are working and can’t have this code break all the time.
Hope you can help me in this case.
Best regards