Embed

embed.insert#

Arguments:

  • instance Object
    • The instance of the embed block
  • data Object
    • The response object with data of the inserted embed

Occurs whenever an embed is inserted into the editor using the embed.insert API method.

Redactor('#entry', {
    subscribe: {
        'embed.insert': function(event) {
            const data = event.get('data');
            const instance = event.get('instance');
            const $embed = instance.getBlock();
        }
    }
});

embed.change#

Arguments:

  • data Object
    • The object with data of the embed

Occurs whenever the embed properties change.

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

embed.remove#

Occurs whenever an embed removed.

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