I created a new atto plugin, based on the link plugin, called linkadv (https://moodle.org/plugins/atto_linkadv) that does exactly what you're after. Just switch out link for linkadv in the toolbar.
Text editors
Anchor tag workaround for Atto editor
This discussion has been locked so you can no longer reply to it.