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

open #

Open the modal window to insert a file.

this.app.api('module.file.open');

or external call:

$R('#content', 'module.file.open');

insert #

Arguments
data Object

Insert a file or files to Redactor with following data object:

var data = {
    myfilekey: {
        id: 'some a file id',
        name: 'name of file',
        url: 'file url'
    }
};

Call method:

this.app.api('module.file.insert',  data);

or external call:

$R('#content', 'module.file.insert', data);

remove #

Arguments
el Node Element Dom

Remove the specified file.

this.app.api('module.file.remove', el);

or external call:

$R('#content', 'module.file.remove', el);