When using layout: bodied to get a macro body, the Custom UI html is not used when in page edit mode. How can I enable my own rendering of the body data when in edit mode like it was on Connect so that the user can see how the, in this case diagram, will look on the page before publishing?
A workaround is to use a config instead of a body to replace the plaintext body of connect:
const button = document.getElementById('save');
button.onclick = async () => {
const payload = {
config: {
'fakePlainTextBody': textArea.value
},
// body: createPlainTextADF(textArea.value)
};
try {
await view.submit(payload);
} catch (err) {
console.error(err);
}
}