Block

block.set#

Arguments:

  • instance Object
    • Instance 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 Object
    • Instance 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 String
    • Type of the removed block.

Occurs whenever a block removed.

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

block.duplicate#

Arguments:

  • instance Object
    • Instance of the duplicated block.

Occurs whenever a block duplicated.

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