Event listening for loaded asset
I got it with update target updateTarget(trgt) { const image = this.model; const dirName = image.attributes.src; const filename = dirName.replace('https://d3d4x44eptevwm.cloudfront.net/md/',''); trgt.set('attributes', { src: https://d3d4x44eptevwm.cloudfront.net/md/${filename}, srcSet: https://d3d4x44eptevwm.cloudfron...
Read full answer below βQuestion
I need to find a way to expose the event listener when an image has been selected in the Asset Manager, is there a way to do it? I can only see event listeners when the image is uploaded, not selecting a pre-defined asset.
Thanks
Answers (1)
I got it with update target updateTarget(trgt) { const image = this.model; const dirName = image.attributes.src; const filename = dirName.replace('https://d3d4x44eptevwm.cloudfront.net/md/',''); trgt.set('attributes', { src: https://d3d4x44eptevwm.cloudfront.net/md/${filename}, srcSet: https://d3d4...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2516
Asset manager alert
Hi, thanks for the wonderful editor, I Tried to integrate the editor and everything is Fine. When the user selects an image from the asset...
Issue #2408
Event listener for undo?
I am listening for a component delete and move with removed() and sorter:drag:end. One last way (I hope) that I see the component move is b...
Issue #3415
Custom Asset Manager. How to set bg image
Hi there! I'm building a custom modal for the Asset Manager and basically, it seems that I need to override command. How I can understand i...
Issue #1462
Uploaded image error
We have gotten GrapesJs integrated into our Angular application. We have the asset manager showing a list of images that have been uploaded...
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.
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps β a beginner-friendly 2026 comparison
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Tutorial
How We Built Composeit in Record Time Using GrapesJS Shadcn
Bypass foundational builder boilerplate and focus on what truly matters.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.