Issue #4575Opened September 10, 2022by Aventrue1 reactions

Custom is missing in the AssetManagerConfig

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome

Reproducible demo link

this is a compile error

Describe the bug

The property custom is missing in the AssetManagerConfig. It works if I use the untyped grapesjs but I want use it with types. Is there a workaround for this problem?

Id do it like discripted here: https://grapesjs.com/docs/modules/Assets.html#customization image

index.d.ts image

Code of Conduct

  • I agree to follow this project's Code of Conduct

Answers (2)

AventrueSeptember 10, 20220 reactions
Code SnippetTEXT
My workaround:

let assetConfig: grapesjs.AssetManagerConfig = {};
    assetConfig["custom"] = {
      open: (props) => {
        this.openGalleryDialog(props);
      },
      close: (props) => {
        this.dialog.closeAll();
      },
    };

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.