Issue #2868Opened July 1, 2020by BerkeAras9 reactions

[Bug]: Cannot disable asset-manager

Question

GrapesJS Version: 0.16.18 Client: Windows 10 1909; Brave Chromium (latest) Expected behavior: It should be possible to disable the asset-manager Current behavior: Asset manager is not disabled using this code:

...
assetManager: {
     upload: false
},
...

Full code: https://pastebin.berkearas.de/?44ff08e13bab068d#5AuNABBrvbkcYp8zh5r59jkmtqJQcsuTj5jSfykMVGxd Live demo: https://codesandbox.io/s/jolly-river-p8zkt?file=/index.js

Answers (2)

artfJuly 14, 20209 reactions

@mcottret is right but if you'd like also to disable the opening of the Asset Manager modal you can overwrite its command in this way:

editor.Commands.add('open-assets', () => console.log('do nothing'));
mcottretJuly 2, 20200 reactions

Hi @BerkeAras !

I don't think there's currently a way to completely disable the Asset Manager, you should however be able to disable adding images.

Setting the upload option to false only disables uploading of images, but not base64 embedding. Which is why images can still be added.

Also disabling base64 embedding like the following might be the closest you can get:

assetManager: {
    upload: false,
    autoAdd: false,
    embedAsBase64: false
}

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.