link:change#
Emitted when link URL or target changes on an image block or inline <a>.
Type: signal.
Payload:
- scope —
imageorinline - url — link URL string
- newTab — boolean — open in new tab
- block — image block instance (optional)
- element — inline
<a>element (optional)
Example:
app.on('link:change', ({ scope, url, newTab, block, element }) => {
if (scope === 'inline') {
element.dataset.tracked = '1';
} else {
block.setMeta({ lastUrl: url });
}
});
link:remove#
Emitted when a link is removed.
Type: signal.
Payload:
- scope —
imageorinline - data — removal context (shape depends on
scope)
Example:
app.on('link:remove', ({ scope }) => {
analytics.track('link-removed', { scope });
});
link:set#
Emitted when a link is applied from the link UI.
Type: signal.
Payload:
- scope —
imageorinline - url — link URL string
- newTab — boolean — open in new tab
- block — image block instance (optional)
Example:
app.on('link:set', ({ scope, url, block }) => {
if (scope === 'image') trackImageLink(block, url);
});