Modal

modal.open #

Arguments
modal Object modal object
form Objectmodal form object

Triggered before modal shows up.

$R('#content', {
    callbacks: {
        modal: {
            open: function(modal, form)
            {
                // ...
            }
        }
    }
});

Listen to the message in a plugin:

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

        // messages
        onmodal: {
            open: function(modal, form)
            {
                // ...
            }
        }
    });
})(Redactor);

modal.opened #

Arguments
modal Object modal object
form Objectmodal form object

Triggered after modal shows.

$R('#content', {
    callbacks: {
        modal: {
            opened: function(modal, form)
            {
                // ...
            }
        }
    }
});

Listen to the message in a plugin:

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

        // messages
        onmodal: {
            opened: function(modal, form)
            {
                // ...
            }
        }
    });
})(Redactor);

modal.close #

Arguments
modal Object modal object
form Objectmodal form object

Triggered before modal close.

$R('#content', {
    callbacks: {
        modal: {
            close: function(modal, form)
            {
                // ...
            }
        }
    }
});

Listen to the message in a plugin:

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

        // messages
        onmodal: {
            close: function(modal, form)
            {
                // ...
            }
        }
    });
})(Redactor);

modal.closed #

Arguments
modal Object modal object
form Objectmodal form object

Triggered after modal is closed.

$R('#content', {
    callbacks: {
        modal: {
            closed: function(modal, form)
            {
                // ...
            }
        }
    }
});

Listen to the message in a plugin:

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

        // messages
        onmodal: {
            closed: function(modal, form)
            {
                // ...
            }
        }
    });
})(Redactor);