Jason Lemahieu (MadtownLems)
Member
Posted 8 months ago #
I'm working on a Related Posts plugin, and would like to utilize the "Link to Existing Content" feature that is available when adding a link via TinyMCE. However, I'm stumped.
I took a look at the code, and didn't really get anywhere. I'm guessing it's all a bunch of javascript tucked away somewhere, but didn't have any luck locating it. Any suggestions on how I can take advantage of this without coding it from scratch?
Spencer Cameron
Member
Posted 8 months ago #
The link dialog that uses this functionality is generated by wp_link_dialog() in wp-includes/class-wp-editor.php.
You'll also want to look at wp-includes/js/wplink.js as it appears to be responsible for the behind-the-scenes whizbang you're looking for here. :)
You'll probably want to grab a copy that's not minified. ;)