Grapesjs: Asset Manager replacement

Created on 8 Nov 2017  路  3Comments  路  Source: artf/grapesjs

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?

outdated

Most helpful comment

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)

All 3 comments

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)

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

faizansaiyed picture faizansaiyed  路  3Comments

tribulant picture tribulant  路  3Comments

ionic666 picture ionic666  路  3Comments

applibs picture applibs  路  3Comments

kawika-connell picture kawika-connell  路  3Comments