Back to Website
Show / Hide Table of Contents

Interface IAssetSources.IMemorySourceConfig

A structure defining asset sources through direct URLs.

Inheritance
IAssetSourceConfig<"MemorySource">
IAssetSources.IMemorySourceConfig
Package: @aurigma/design-editor-iframe
Examples

You can define images througn direct URLs with the following config.

{
  "assetSources": {
    "External urls": {
      "type": "MemorySource",
      "allCategoryEnabled": false,
      "rootCategory": {
        "assets": [
          {
            "title": "Square",
            "preview": "http://example.com/images/preview/2.jpg",
            "source": "http://example.com/images/2.jpg"
          },
          {
            "title": "Buildings",
            "preview": "http://example.com/images/preview/4.jpg",
            "source": "http://example.com/images/4.jpg"
          }
        ],
        "categories": [
          {
            "name": "Stock images",
            "assets": [
              {
                "title": "Winter",
                "preview": "http://example.com/images/preview/16.jpg",
                "source": "http://example.com/images/16.jpg"
              },
              {
                "title": "Skating",
                "preview": "http://example.com/images/preview/20.jpg",
                "source": "http://example.com/images/20.jpg"
              }
            ]
          }
        ]
      }
    }
  },
  "widgets": {
    "AssetManager": {
      "tabs": [
        {
          "name": "The gallery based on external urls",
          "assetSourceInstance": "External urls",
          "iconClassName": "cc-icon-add-image"
        }
      ]
    }
  }
}

Properties

allCategoryEnabled

Disables the All category. The default value is true.

Declaration
allCategoryEnabled: boolean;
Property Value
Type Description
boolean

Disables the All category. The default value is true.

rootCategory

The object defining assests for the root category of this source.

Declaration
rootCategory: IMemorySourceConfig.ICategory;
Property Value
Type Description
ICategory

The object defining assests for the root category of this source.

Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback