Re-use Core's "Link to Existing Content" in plugin? (2 posts)

  1. 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?

  2. Spencer Cameron-Morin
    Posted 3 years 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. ;)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.