I’m developing mi first plugin, and learning at same time.
The plugin allows to use more than 1 url in any link,
I’ve been ok this far, but now I’m stucked.
I am using shortcode to insert a link, I know how to do shortcode. But the thing is that I can’t find the way to GET the ANCHOR TEXT.. just like native WP link button works.
What I need to do is basically:
When clicking custom shortcode button (done) if selected text exists, copy, delete the selected text in visual editor. And after that paste it into the shortcode.
I think thats the way it should work.. maybe I’m wrong,
Hoping somebody can help me.
Read more here:: Create custom shortcode for insert link in text editor