Block border

blockBorder:open:data#

Emitted with border form data when the Block Border plugin opens its UI.

Type: signal.

Payload:

  • block — target block instance
  • data — current border form values

Example:

app.on('blockBorder:open:data', ({ data }) => {
  if (!data.color) data.color = '#000000';
});

blockBorder:save:data#

Hook emitted before block border styles are saved. Return modified data or call stop() to cancel the save.

Type: hook (handler may return a value; call stop() to cancel).

Payload:

  • block — target block instance
  • data — border values to apply
  • stop — call to cancel the save

Example:

app.on('blockBorder:save:data', ({ data, stop }) => {
  if (data.width === '0') {
    stop();
    return;
  }
  return { data };
});