WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year 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?

  2. Spencer Cameron
    Member
    Posted 1 year 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

Tags

No tags yet.