Skip to content
Discussion options

You must be logged in to vote

Unfortunately this issue is due to the native DOMParser which outputs an empty document if you try to pass an invalid syntax. For example this what is passed in the case of Column:

<body>
  <td ...></td>
</body>

as having only <td> without the full table around it is an invalid syntax, the result will be empty and the editor won't be able to know what component to create.

The workaround here is to avoid the parser and pass directly the component definition, eg:

{
    ...commonBlockProps,
    label: "Column",
    content: { 
      type: 'cell', 
      // ...
      style: { width: 'calc(100% / 7)' } 
    },
  }

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gxanshu
Comment options

Answer selected by gxanshu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants