Asset manager alert
Hi @pradeeshattlee place the below code inside a plugin: for more on extending asset manager, check out this link cheers!
Read full answer below ↓Question
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 manager there is no action if an alert is shown that image has been replaced or image selected successfully how can an alert be achieved is there any options for That. Couldn't find a way to add an alert please let me know if there is a way to achieve this
Answers (3)
I tried the bellow code the alert is shown on a single click but the image doesn't get replaced
This happens because you overwrite the original method, to extend it correctly you should do this:
const am = editor.AssetManager;
const tImageView = am.getType('image').view;
am.addType('image', {
view: {
onClick(){
tImageView.prototype.onClick.apply(this);
alert('Selected Successfully!');
this.em.get('Modal').close();
},
}
})
Thanks @artf this works like a charm.
Related Questions and Answers
Continue research with similar issue discussions.
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 #2723
Event listening for loaded asset
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...
Issue #2023
TUI Editor
Hello all, Im having a problem with the TUI editor plugin, If I try to edit a newly updated image that has been through the asset manager,...
Issue #2165
[QUESTION] How to extend style manger Sector's property
Hi @artf , We have created a custom asset manager which is working perfectly for image component. However we are not able to call custom as...
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
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
GrapesJS vs Webflow vs Builder.io vs Puck: Which Visual Builder to Choose in 2026
A practitioner's 2026 comparison of GrapesJS, Webflow, Builder.io, and Puck — pricing, AI features, lock-in, and a one-line rule for picking the right one
Tutorial
Why use grapesjs shadcn for your template builder
Skip months of editor plumbing and start with a fully working visual builder — polished UI included.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.