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

Dropdown

dropdown.open #

Arguments
e Object mousedown event object
dropdown Object dropdown object
button Objectobject of the button which is pressed to open the dropdown

Triggered before dropdown shows up.

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

Listen to the message in a plugin:

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

        // messages
        ondropdown: {
		    open: function(e, dropdown, button)
            {
                // ...
            }
        }
    });
})(Redactor);

dropdown.opened #

Arguments
e Object mousedown event object
dropdown Object dropdown object
button Objectobject of the button which is pressed to open the dropdown

Triggered after dropdown shows.

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

Listen to the message in a plugin:

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

        // messages
        ondropdown: {
		    opened: function(e, dropdown, button)
            {
                // ...
            }
        }
    });
})(Redactor);

dropdown.close #

Arguments
dropdown Object dropdown object
button Objectobject of the button which is pressed to open the dropdown

Triggered before dropdown close.

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

Listen to the message in a plugin:

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

        // messages
        ondropdown: {
		    close: function(dropdown, button)
            {
                // ...
            }
        }
    });
})(Redactor);

dropdown.closed #

Arguments
dropdown Object dropdown object
button Objectobject of the button which is pressed to open the dropdown

Triggered after dropdown is closed.

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

Listen to the message in a plugin:

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

        // messages
        ondropdown: {
		    closed: function(dropdown, button)
            {
                // ...
            }
        }
    });
})(Redactor);