Silverstripe CMS - this is a module for Silverstripe Framework rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.
[x] All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
Description
If you have a link in tinymce like
<a href=""><span>Title</span></a>
, then you can edit the link. The HTML inside the link tag can be any tag.The issue is that the selected node is the inside HTML tag instead of the link tag.
I'm not 100% keen on the solution using
while
but this is legacy code, so might be ok! Alternative code is welcomed :)This PR is needed for https://github.com/silverstripe/silverstripe-admin/pull/1814
Manual testing steps
Issues
Pull request checklist