You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Excessive nested span tags generated when repeatedly copy-pasting text with white background color #420
When using TinyMCE with Angular, repeatedly copy-pasting text segments with white background color results in excessive nested <span> tags being generated in the editor content.
Steps to Reproduce
Initialize TinyMCE editor in Angular application
Input a paragraph of text in the editor
Select all text and set background color to white
Randomly select a portion of text from the middle of the paragraph
Copy the selected text (Ctrl+C)
Position cursor at a fixed location in the editor
Paste the copied text (Ctrl+V)
repeat 5-7 more times
Expected Behavior
The pasted text should maintain clean HTML structure with minimal nested tags, similar to:
<p><spanstyle="background-color: white;">Your text content</span></p>
Actual Behavior
After multiple copy-paste operations, the HTML structure becomes heavily nested with multiple <span> tags:
<p><spanstyle="background-color: white;"><spanstyle="background-color: white;"><spanstyle="background-color: white;"><spanstyle="background-color: white;">
Your text content
</span></span></span></span></p>
@cyxysky The issue appears to be specific to TinyMCE's pasting behaviour. I even tried but could not be reproduced on tinymce specific fiddle.tiny.cloud. Could you confirm whether the issue still exists?
Activity
tiny-ben-tran commentedon Mar 17, 2026
@cyxysky The issue appears to be specific to TinyMCE's pasting behaviour. I even tried but could not be reproduced on tinymce specific fiddle.tiny.cloud. Could you confirm whether the issue still exists?