Issue #2581💬 AnsweredOpened February 18, 2020by Jogai0 reactions

How to use components

Quick answerby pouyamiralayi

Hi @Jogai you must also specify the `data-gjs-draggable on the <td>`: Cheers!

Read full answer below ↓

Question

Using GrapesJS 0.15.10 I cant get the components to work the way I intent. Its probable me, so if its a question, feel free to adjust the title of the issue. (its a follow up of https://github.com/artf/grapesjs/issues/2195) I've made a pen (hope thats ok, didnt see the fiddle templates) for my example: https://codepen.io/jogai/pen/yLNJgLZ?editors=1011 I see the same behavior in chrome & firefox. Expected to have a row with text that is not selectable/draggable/highlightable but instead the row has text that is draggable into the other component. Expected attributes of the component: data-gjs-...

Answers (3)

pouyamiralayiFebruary 18, 2020

Hi @Jogai you must also specify the `data-gjs-draggable on the <td>`: Cheers!

JogaiFebruary 19, 2020

Thanks. At least thats an improvement, but still the other properties are not taken into account, and if you try tro drag it (since the drag arrows still show up) it throws an error and then the whole editor is in a broken state. I updated the example.

JogaiFebruary 20, 2020

Updated the example. Its sort of a followup on https://github.com/artf/grapesjs/issues/2195

My assumption is wrong that draggable needs data-gjs- prefix, because the html part without using component doesnt have that either. Still the child td is not seen as part of the component.

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.