[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)
@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'));
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.
Issue #2921
BUG: Autosave not working on style manager when classes are disabled
Version: 0.16.18 Are you able to reproduce the bug from the demo? [x ] Yes: https://jsfiddle.net/ju1a0onx/ What is the expected behavior? A...
Issue #1418
[BUG?] Asset manager not deleting files on server unless upload triggered.
Running latest version (0.14.29) on local server. Using the example webpage preset. Ubuntu 18.04, Chromium 68. Assetmanager init: And exten...
Issue #4681
BUG: Asset manager upload sending empty object to backend endpoint
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox Reproducible demo link NA Describe...
Issue #6409
BUG: Cannot drag to move components on mobile
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v133 Reproducible demo link https:/...
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.