How do TinYMCE actions expand the selection to include the whole link when you are applying an H1 and how does it distinguish when the bold tag goes inside the link, instead of wrapping the link in it?
I created a new plugin to add a sortcode wrapping the selected text, by clicking an icon in the editor’s toolbar.
It works fine as far as you select many links or text: i.e.: the shortcode wraps the links up as expected.
BUT when the selection is a single link, the $content is returned INSIDE the link, in place of the anchor text.
How does the H1 manages to wrap the whole link instead of the anchor text only as the bold tag does?