Available Functions
Quick Reference
Function
Description
Basic Usage
const transformHook = (rw) => {
const { title, customId, image } = rw.props;
// Pass data to templates
rw.setProps({
title,
displayTitle: title.toUpperCase()
});
// Configure the root HTML element
rw.setRootElement({
as: 'section',
class: 'my-component p-4',
args: { id: customId }
});
// Register anchor for link picker
if (customId) {
rw.addAnchor(customId);
}
// Resize image for thumbnail
const thumbnail = rw.resizeResource(image, 400);
};
exports.transformHook = transformHook;Function Details
setProps
setRootElement
addAnchor
resizeResource
Last updated
Was this helpful?

