Execute a javascript function after adding a block
Question
Hi, I try to create a canvas block and run a javascript which generate ChartJS graph inside. I don't understand how to execute a javascript extern function on a canvas. And how to retrieve the canvas id when is it add?
Thanks !
Answers (2)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #897
How to: find some component at canvas, on event "component:add"
Hi everyone, let say i've added block <form> on canvas. When i adding next <form> (second time) , need to check: if weather this component...
Issue #1912
[QUESTION] Custom component default children
Hi, I am trying to understand how I can achieve the following.Create a component with a default content as children.Create a block to add t...
Issue #1565
Issue to create a "2 columns" block
Hi, Have a new problem, i'm following the tuto and i want to create the block "2 columns" (or more). I try to use (and understand, that's w...
Issue #2008
[Question]The canvas turns dark and unmodifiable on adding a large piece of custom html.
I used to add custom html with editor.addComponent(). It works well at most of the time, but when I try to insert a large piece of HTML whi...
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 →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.