[Bug]: Cannot disable asset-manager
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
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
}
@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'));