When using customButtons, content updated via the onAction callback updates visually but does not trigger the design:updated event. This prevents the builder from recognizing changes automatically, so a workaround (like adding an empty character) is currently needed to save updates.
customButtons: [
{
name: 'my_button',
text: 'Gifs',
icon: 'image',
onSetup: () => {},
onAction: (data, callback) => {
handleOpenGiphyModal({ data, callback });
},
},
];
const handleUpdate = (url) => {
callback(
`${data.text}
<div>
<img
src="${url}"
width="300"
height="300"
/>
</div>`
);
};
Expected Behavior:
Whenever content is updated through a custom button’s onAction callback, the design:updated event should be emitted so the builder automatically recognizes and saves changes.