Issue #491Opened November 8, 2017by ryandeba3 reactions

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)

artfNovember 8, 20172 reactions

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

ryandebaNovember 9, 20171 reactions

Thanks @artf! I was able to get this working very quickly with your suggestion.

lock[bot]December 27, 20190 reactions

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.

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.