Script structure - Fluid Topics - Latest

Fluid Topics Designer Guide

Category
Reference Guides
Audience
public
Version
Latest

Topic content scripts must follow a specific structure. This structure is the following:

export default function example({map, topic, container}) {
    // Content of the script
    console.log("Map:", map);
    console.log("Topic:", topic);
    console.log("Container:", container);
}

Replace example by any function name.

When working with external libraries, import them using the loadExternalScript() method in the portal's Custom JavaScript. This improves the speed of first-time rendering.