Issue #1906💬 AnsweredOpened March 19, 2019by arthuralmeidap0 reactions

Components & Js - Load Template

Quick answerby artf

Hi Arthur, are you able to create a demo of the issue?Other problem: the data-gjs-type is changed to default instead of keeping my custom component type name when the template is loaded. It seems the isComponent method is not called when I have a JS attached to it Do you rely on HTML for storing/loading?

Read full answer below ↓

Question

Hey, I have a component which has a JS attached to it. Everything is created using the JS. When I drag and drop my block for the first time, the JS runs fine and everything works nice. When I load an existing template, it seems the JS is not running. The JS creates some DOM elements like a DIV and CANVAS but they are not displayed. I added an alert and it is displayed but the rest of my JS seems it's not working. Other problem: the data-gjs-type is changed to default instead of keeping my custom component type name when the template is loaded. It seems the isComponent method is not called whe...

Answers (3)

artfMarch 24, 2019

Hi Arthur, are you able to create a demo of the issue?Other problem: the data-gjs-type is changed to default instead of keeping my custom component type name when the template is loaded. It seems the isComponent method is not called when I have a JS attached to it Do you rely on HTML for storing/lo...

ayazhusseinMarch 28, 2019

I'm having the same issue. When I drop a Component with a script, it works but after I refresh, it doesn't You can test it out grapesjs-component-countdown, after you refresh, the digits don't show up. this is my config ( it is used in an Angular application, some help would also be helpful ) UPDAT...

no-response[bot]April 3, 2019

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we ne...

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.