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
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline — both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.