Hey, there! Look at our new WYSIWYG editor.
Documentation

Drag and drop

drop #

Arguments
e Objectthe drop event object

Triggered when some object/element drops on the drop area (the editor).

$R('#content', {
    callbacks: {
        drop: function(e)
        {
            // ...
        }
    }
});

Listen to the message in a plugin:

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

        // messages
        ondrop: function(e)
        {
            // ...
        }
    });
})(Redactor);

dragover #

Arguments
e Objectthe dragover event object

Triggered when the cursor is on the drop area (the editor).

$R('#content', {
    callbacks: {
        dragover: function(e)
        {
            // ...
        }
    }
});

Listen to the message in a plugin:

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

        // messages
        ondragover: function(e)
        {
            // ...
        }
    });
})(Redactor);

dragleave #

Triggered when the cursor leaves the drop area (the editor).

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

Listen to the message in a plugin:

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

        // messages
        ondragleave: function()
        {
            // ...
        }
    });
})(Redactor);

dragstart #

Arguments
e Objectthe dragstart event object

Triggered when object/element starts for the dragging.

$R('#content', {
    callbacks: {
        dragstart: function(e)
        {
            // ...
        }
    }
});

Listen to the message in a plugin:

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

        // messages
        ondragstart: function(e)
        {
            // ...
        }
    });
})(Redactor);