Documentation

Autoparse

autoparse

Arguments
type String the type of conversion (image, video or link)
object Dom object that has been converted

Triggered every time Redactor performs automatic URL conversion (on enter or space keys are pressed). At this time, Redactor automatically converts URLs into links, YouTube and Vimeo URLs into video embeds and image URLs into images

Also Autoparse activates the individual callbacks for each type of object as: image.inserted, video.inserted, link.inserted.

Autoparse callback does not start when Redactor is initializing.

$R('#content', {
    callbacks: {
        autoparse: function(type, object)
        {
            // ...
        }
    }
});

Listen to the message in a plugin:

(function($R)
{
    $R.add('plugin', 'myplugin', {
        init: function(app)
        {
            // define app
            this.app = app;
        },

        // messages
        onautoparse: function(type, object)
        {
            // ...
        }
    });
})(Redactor);