Issue #2697πŸ’¬ AnsweredOpened April 2, 2020by kuhelbeher1 reactions

Problem with custom component type and table cell

Quick answerby artf❀ 1

@kuhelbeher your code is correct (except is extend: 'cell', and not extends: 'cell',), unfortunately, there is a bug (or a bad logic) applied on the row component, so, for now, I'd suggest adding this as a patch: and now it should work: https://jsfiddle.net/corasd1h/

Read full answer below ↓

Question

Hello! I'm trying to add custom component type: And also I'm adding new block: But when I drop this block on the canvas the <td> tag doesn't appear on canvas and DOM. If I remove isComponent function from component definition, it works as expected. Could I get help with this?

Answers (3)

artfβ€’ April 16, 2020

@kuhelbeher your code is correct (except is extend: 'cell', and not extends: 'cell',), unfortunately, there is a bug (or a bad logic) applied on the row component, so, for now, I'd suggest adding this as a patch: and now it should work: https://jsfiddle.net/corasd1h/

noogenβ€’ April 5, 2020

@kuhelbeher because your component is a table per your content definition above and not a td as defined in your addType of tagName property?

kuhelbeherβ€’ April 6, 2020

@noogen I don't think the problem is with this. I tried to define component and block like this: But the problem remains - td tag (and all what is inside of it) doesn't appear on canvas, Maybe I'm doing something wrong? I am trying to create new component type from built-in 'cell' type but it shoul...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.