I am working on customizing the LayerHub Editor and I need to add custom HTML elements, such as videos or iframes, to the canvas programmatically. I want to know how to create a new field that can handle HTML content like <iframe /> or video tag.
Current Implementation (for Adding Images):
const addObject = React.useCallback(
(url: string) => {
if (editor) {
const options = {
type: 'StaticImage',
src: url,
};
editor.objects.add(options);
}
},
[editor]
);
I am working on customizing the LayerHub Editor and I need to add custom HTML elements, such as videos or iframes, to the canvas programmatically. I want to know how to create a new field that can handle HTML content like <iframe /> or video tag.
Current Implementation (for Adding Images):