You are here:
< Back

Integrating NodeJs modules into the Editor

 

The Scripts environment gives you the ability to have custom elements on your server inside the content editor.

The icon image mentioned in the Creating own nodejs modules article will show up in the editor as the element icon.
The place holder image will show once the element is placed onto the canvas.

 

Custom query parameters

Custom query parameters can be added in the config.json file to let the user control parameters of your widget.

For example:

"query_params":[
        {
            "property": "token",
            "type": "text",
            "default": "Instagram authentication token"
        },
        {
            "property": "duration",
            "type": "number",
            "min": 3,
            "max": 100,
            "default": 5
        },
        {
            "property": "direction",
            "type": "select",
            "default": "up",
            "options": [
                { 
                    "label": "up",
                    "value": "up"
                },
                { 
                    "label": "down",
                    "value": "down"
                },
                { 
                    "label": "right",
                    "value": "right"
                },
                { 
                   "label": "left",
                   "value": "left"
               }
            ]
        }
]