Take a look at our new Article and Redactor X editors.

build #

Arguments
options Object

Build and open the modal window with the following options object:

var options = {
    name: 'modalname',
    title: 'modal title',
    width: '800px', // optional, 600px by default
    height: '400px', // optional
    handle: 'save',  // optional, command which will be fired on enter pressed
    commands: // optional object
    {
        save: { title: 'Save' },
        cancel: { title: 'Cancel' }
    }
};

Call method:

this.app.api('module.modal.build', options);

or external call:

$R('#content', 'module.modal.build', options);

close #

Close the Redactor modal window.

this.app.api('module.modal.close');

or external call:

$R('#content', 'module.modal.close');