Issue #2868✓ SolvedOpened July 1, 2020by BerkeAras9 reactions

Cannot disable asset-manager

快速解答by artf9

@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:

Read full answer below ↓

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)

👍 Most helpfulartfJuly 14, 2020

@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, 2020

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.