Viewing 1 replies (of 1 total)
  • For what it’s worth, you can edit the JS for this field, changing:

    jQuery('body').on('click', '.link-btn', function(event)
            {
                var thisID = jQuery(this).attr("id");
                doingLink = thisID;
    
                wpActiveEditor = true; // we need to override this var as the link dialogue is expecting an actual wp_editor instance
                //console.log(wpLink);
                wpLink.open(); // open the link popup
                return false;
            });

    To:

    jQuery('body').on('click', '.link-btn', function (event)
            {
                var thisID = jQuery(this).attr("id");
                doingLink = thisID;
    
                wpActiveEditor = true; // we need to override this var as the link dialogue is expecting an actual wp_editor instance
                wpLink.setDefaultValues = function () {
                    $('#url-field').val($('#' + doingLink + '-url').val());
                    $('#link-title-field').val($('#' + doingLink + '-title').val());
                };
                wpLink.open(); // open the link popup
                return false;
            });

Viewing 1 replies (of 1 total)
  • The topic ‘"Edit Link" resets data’ is closed to new replies.