Issue #4110Opened January 28, 2022by cusmai0 reactions

BUG: AssetManager events not working

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome

Reproducible demo link

NA

Describe the bug

AssetManager events are not fired. The file gets uploaded correctly but events are not notified:

     // Asset Event Listners

    editor.on('asset:upload:start', () => {
      // The upload is started
      console.log('Upload started');
    });

    editor.on('asset:upload:end', () => {
      // The upload is ended (completed or not)
      console.log('Upload ended');
    });

    editor.on('asset:upload:error', (err) => {
      // Error handling
    });

    editor.on('asset:upload:response', (response) => {
      // Do something on response
      console.log(response);
    });

Code of Conduct

  • I agree to follow this project's Code of Conduct

Answers (2)

timramseyjrSeptember 21, 20220 reactions

@cusmai Did you ever figure this one out? I am getting asset:open and asset:close, but I am not getting any of the events you listed either.

I am using the following and the two events I mentioned are the only related asset events I am getting.

editor.on('asset', (evt) => {
	console.log(evt);
});
ALTITUDE-DEV-FRJanuary 22, 20230 reactions

Same for me not working :(

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.