Not an exact answer to your question (hooking into the insert/edit link functionality), but possibly an alternate method that can achieve the same goal (inputting a permalink, outputting a Post ID):
https://codex.wordpress.org/Function_Reference/url_to_postid
Related Posts:
- Custom wp_editor doesn’t update post_content
- Check for update vs new post on save_post action
- How to avoid infinite loop in save_post callback
- $update is always true in save_post
- Action hook ‘save_post’ triggered when deleting posts
- get post meta before it is updated (during SAVE_POST)
- save_post action firing before I publish / save the post
- save_post action only when creating a new post
- Check if value has changed on save_post
- Minimum Word Count Before A Post Can Be Made Pending Review
- update_post_meta() not working in save_post
- How do I save each option in a multiple select menu as it’s own meta_key + meta_value pair?
- Update post on save
- Post meta checkbox becomes unchecked occasionally
- Return code from save_post action?
- Get the post_id of a new post
- update_post_meta not working in save_post
- save_post only saves meta data on second save
- How to manage saving custom field from Quick edit and Post Save using save_post action hook without colliding each other?
- Why save_post_$(custom_post_type) is fired even if I am not already saving a post?
- Set the value of custom field when post is published or updated
- pass error to admin_notices on “quick edit”/save_post action
- save_post requiere at least one uploaded file to be published
- Get $_POST & $_REQUEST values before adding/updating post
- How can I create a new user account while creating a new post, and then set that new user as the author of that new post?
- Validate post checking if child term is assigned
- Clear cache on post of one type when something happens to post of other type
- Why not fire the save_post event?
- Compare custom taxonomies of updated post (or new post) [Updated with progress]
- WordPress 4.9.8 doesn’t save if content has style=”
- Reset all transients on post or page save
- Using PODS data with save_post
- Cant’t delete my custom posts
- where does this $post_id come from?
- Migrating from metaboxes to wp_editor()
- Update current WP post every 3 minutes [closed]
- Changing new post to “pending” on publish – but “Publish failed” – why?
- update_post_meta not working in foreach
- Save post in another table
- Strange bug on post/page save
- draft_to_pending action doesn’t seem to fire
- What action to use for when a post is saved / published, with a caveat
- Save custom value to main content of post
- Check for page template on save_post hook
- Access NEW/UPDATED post values in save_post() callback function
- Bookmarking custom template pages which all have the same page ID
- save button grayed out randomly
- Post editor doesn’t save embed media [closed]
- How to get a post meta value and pass that to update_option when a post is created or updated?
- WordPress save meta data : Displaying the word Array when selected
- Save current post using custom save button
- Get Post ID in Admin Edit screen otherwise generate it?
- Connection Reset on post/page save
- Meta data not saved on save_post
- Insert/Update DB table when making new post or update older one
- Prevent Page/Post From Being Created based on Pages/Posts per User per Time Unit
- How to debug | Some times the “Save Draft” button seems to spin but does not actually save
- My custom title gets duplicated at every save or post update
- Use save_post to generate file on wordpress
- Detect, if post is saved manually or programmatically in save_post-hook
- Check if new post or update before save_post action
- Why would I get a “Trying to access array offset on value of type bool” warning when using “metadata_exists()” in save_post?
- Get page ID of page that is set as the posts page
- How to get current page ID outside the loop?
- how to get page id of a page using page slug
- Why does save_post action fire when creating a new post?
- what is correct way to hook when update post
- Add validation and error handling when saving custom fields?
- Adding Custom Text Patterns in the WP 4.5 Visual Editor
- Using save_post to replace the post’s title
- How to load wp_editor() through AJAX/jQuery
- Passing error/warning messages from a meta box to “admin_notices”
- get post author id outside loop
- Prevent post from being published if custom fields not filled
- Creating a wp_editor instance with custom tinyMCE buttons
- How to get Author ID outside the loop
- Custom Walker: how to get ID in function start_lvl
- How to get page title with the page ID?
- wp_editor textarea value not updating
- How to load wp_editor via AJAX
- Remove inline linking tool
- How to get permalink and title from post ID?
- How do I get the current edit page ID in the admin?
- Echo author ID in author.php
- Get page IDs from nav items
- How to filter or remove default panels in Gutenberg PrePublish Panel
- Remove HTML editor and visual/HTML tabs from TinyMCE
- Metabox with checkbox is not updating
- How to get home page ID?
- Force post slug to be auto generated from title on save
- How to get the input of a TinyMCE editor when using on the front-end?
- Set custom messages for post update/save
- Return $post_id when DOING_AUTOSAVE?
- wp_editor() fields on Theme Options Page not saving
- Sanitize content from wp_editor
- Load wp_editor via ajax [duplicate]
- Show Default Editor on Blog Page ( Administration Panel )
- Are post ID’s reliable?
- Post custom metabox textarea using wp_editor
- Get current post id in functions.php