Components & Js - Load Template
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)
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...
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...
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.
Issue #1493
[QUESTION] render() works on the first time but not on subsequent calls
Hello, I've created a custom component that shows images using background-image on a <div> instead of using an <img> element. It's mostly w...
Issue #1696
Traits appear first time when draged custom component
Hi artf , i have created custom component and add traits for it , when dragging this component to editor and select it the setting traits w...
Issue #1121
[BUG] - <Tbody> inside <Table>
Hi @artf , I created a new component with tagName = 'table'. When selected and one option of its toolbar I also created is clicked, a new m...
Issue #1123
[QUESTION] Onload event inside template
Hi! I have a problem with some templates. This template has some scripts running after the page is loaded. When this templates is loaded by...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.