Asset Manager replacement
Question
Is it possible to replace the asset manager with something completely different (such as CKFinder - https://ckeditor.com/ckeditor-4/ckfinder/)? Alternatively, would it be possible to launch the included asset manager outside the context of grapesjs?
Answers (3)
Well, never tried it before but I think you can achieve it just by replacing the current command
editor.Commands.add('open-assets', {
run(editor) {
...
}
})
This is how the command is called https://github.com/artf/grapesjs/blob/e921165a8d681b5d1056c816f88dd7719d4f61e0/src/dom_components/view/ComponentImageView.js#L68
the target is actually all what you need. When you select the element from a custom manager you just update the target with target.set('src', url)
UPDATE: new is API available for AssetManager customization https://grapesjs.com/docs/modules/Assets.html#customization
Thanks @artf! I was able to get this working very quickly with your suggestion.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1018
[Question] Change default panel for Block Manager and Style Manager
Hi again Artf, I was reviewing the files that you defined with the basic commands (such as opening the style manager) and I have a question...
Issue #401
Cannot upload images
Hi, while uploading an image through asset manager, I get the following error: Assetmanager configuration at editor init looks like Folder...
Issue #497
Asset manager
hi @artf , is it possible to replace current asset manager , from my custom one? I have created my own asset manager , i want to use that t...
Issue #593
CKEditor Link button Issue
I successfully replace richtexteditor to ckeditor in grapesjs. but there is a link button issue. The issue is that it is not linking correc...
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.