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)
@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);
});
Same for me not working :(
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4335
BUG: No way to upload background video component in the editor , Please suggest if there is any way to upload background video
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v9 Reproducible demo link Not there...
Issue #5631
BUG: Undo manager add() not working as expected
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v91 Reproducible demo link -- Descr...
Issue #5037
FEATURE: How to drag external text into particular index inside the textable component?
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link NA Describe...
Issue #4577
BUG: prevent event using custom plugin
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? chrome latestReproducible demo link there is...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.