For future people coming to this with the same issue, I did come up with a solution but I'm not overly happy about it as there should be an option for this as it's PERFECTLY valid in HTML5
In your config.js
file, add in the following config setting:
config.protectedSource.push(/[\r|\n]|(<a([^*>]+>)|<\/a>)/g);
Here's a demo of the regex working: DEMO
Basically all we're doing here is:
- Finds new lines
\r
- Finds new rows
\n
- Finds any opening anchors:
<a
followed by an text until we come to >
- (<a([^*>]+>)
- Finds closing anchor tags
<\/a>
This regex will stop validing the found results, I'm sure there's a better way to do this as I'm not regexPERT (<-- good at puns though!)
This should disable the UI for editing anchors in wysiwyg mode. This fixed worked for me because the editors I'm adding this to are fixed in source mode, so this is fine for this purpose.
config.allowedContent = true;
config.fullPage = false;
Hope this helps