Customizing the assets-manager view
Question
I would like to create a custom assets-manager modal to open in bootstrap modal. I'd like to keep the original assets manager functionality (like drop image zone, input to fetch image from remove, and I'd like to use datatable for the images/assets). In addition, I would like to integrate with Pixabay API so images can be easily entered into the editor. This can be in a separate tab. See mockup.
Would you please offer some general guideline on how I can create a bootstrap modal in my view and load the assets manager inside it?

Answers (3)
@kickbk did you achieve the custom asset manager ? If yes please share the code
You can do this with a custom modal by overwriting the default image asset manager.
editor.Commands.add("open-assets", {
run(editor, sender, opts) {
const assettarget = opts.target;
// code to open your own modal goes here.
openModal(assettarget)
}
});
When you want to set an image use this.
const assettarget = opts.target;
assetTarget.set("src", image.url);
I'd suggest the same solution proposed by @khoa-justuno If you need a new modal it will be easier to create the Asset Manager UI from scratch, reusing the DOM elements created by GrapesJS, in this case, would be just a pain to maintain
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2099
Changing asset via command
Hello All, I would like to emulate the assets manager image replace behavior. for example I created a view on the side with all the images...
Issue #2542
[Question] Image-like component with own asset manager
Hi everyone! I have a question about my problem, which I want to solve for about 1 month. The question is: Can I create a component, like a...
Issue #1573
Open modal after drop element
How to show custom modal dialog when drop element on editor? like asset modal dialog appears when drop image block to the editor.
Issue #362
How to create custom link components that prompts users to type link/choose link similar to Images Component Modal
Image Components have logic to call Modal and prompt user's interaction for options/configuration of image url. Would like to do similar to...
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.