Issue #2723💬 AnsweredOpened April 20, 2020by lewishealey0 reactions

Event listening for loaded asset

Quick answerby lewishealey

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)

lewishealeyApril 20, 2020

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.

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 →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.