Skip to content

How to Add Custom HTML Fields (e.g., <Video> or <Iframe>) to the LayerHub Editor?  #5

Description

@unrealdinesh

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]
);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions