Problem/Motivation
Ckeditor moves span around by itself.
Steps to reproduce
Pasting this inside the source code view and switching back to wysiwyg mode.
<span class="ctr-box"><a class="ctr-button" href="https://www.drupal.org" rel="noopener nofollow" target="_blank">FOO</a></span>
Will result in :
<p>
<a class="ctr-button" href="https://www.drupal.org" target="_blank" rel="noopener nofollow"><span class="ctr-box">FOO</span></a>
</p>
The span tag is moved inside the a tag. Kills the styling and logic of many of my templates.
Comments
Comment #2
cilefen commentedDoes this happen on the demos? https://ckeditor.com/
Comment #3
wim leersThanks, @cilefen!
Related question: did you search https://github.com/ckeditor/ckeditor5 for a relevant upstream issue?
Comment #4
wim leersMight be related to #3389707: [upstream] CKEditor 5 merges nested and adjacent <span>s.
Comment #5
marcoka commentedThank you for the Info.
It can be reproduced with this page: https://ckeditor.com/docs/ckeditor5/latest/features/html/general-html-su...
Problem is that this "feature" kills content, data loss.
Can´t find any issues but the linked issue links an issue that is very similar.
Comment #6
dokumori commentedI ran into the same issue. Although the wording is different, I opened an issue in their issue queue:: https://github.com/ckeditor/ckeditor5/issues/15408
I was able to reproduce the issue on their demo page so it has to do with CKEditor5, not Durpal. Maybe this ticket can be closed (won't fix), but I'll let the maintainers decide.
Comment #7
wim leersThanks @dokumori!
Ideally, we would add a test that detects when this is either fixed or when this regresses.