Documentation / Events

Block

block.set #

Arguments
instance ObjectInstance of the block.

Occurs whenever a block selected.

Redactor('#entry', {
    subscribe: {
        'block.set': function(event) {
            let instance = event.get('instance');
        }
    }
});

block.unset #

Occurs whenever a block unselected.

Redactor('#entry', {
    subscribe: {
        'block.unset': function() {
            ...
        }
    }
});

block.change #

Arguments
instance ObjectInstance of the changed block.

Occurs whenever a block changed. At the moment works only when the embed or code content is changed.

Redactor('#entry', {
    subscribe: {
        'block.change': function(event) {
            ...
        }
    }
});

block.remove #

Arguments
type StringType of the removed block.

Occurs whenever a block removed.

Redactor('#entry', {
    subscribe: {
        'block.remove': function(event) {
            ...
        }
    }
});

block.duplicate #

Arguments
instance ObjectInstance of the duplicated block.

Occurs whenever a block duplicated.

Redactor('#entry', {
    subscribe: {
        'block.duplicate': function(event) {
            ...
        }
    }
});