Configuration

Configuration of Generic properties is done in the writer client configuration file

This section assumes the reader is familiar with the writer client configuration file, Article's NewsML format, and JSON in general.

Generic Properties configuration is part of the writer client configuration file, it is not accessible from the Configuration Test Tool in the Writer.

Basic Configuration Example

Below is an example which adds two Generic Properties, "position", and "fullwidth". Two plugins use the position-property, image gallery and image, while only image uses the fullwidth-property.

Example of generic properties configuration in Writer client config file:

{
    "propertiesConfig": {
        "showByDefault": [
            "im-ximimage"
        ],
        "properties": [
            {
                "name": "position",
                "title": "Position",
                "plugins": [
                    "im-imagegallery",
                    "im-ximimage"
                ],
                "values": [
                    {
                        "title": "Left",
                        "value": "left"
                    },
                    {
                        "title": "Right",
                        "value": "right"
                    },
                    {
                        "title": "Center",
                        "value": "center"
                    }
                ]
            },
            {
                "name": "fullwidth",
                "title": "Full Width",
                "plugins": [
                    "im-ximimage"
                ],
                "values": [
                    {
                        "title": "Yes",
                        "value": "1"
                    }
                ]
            }
        ]
    },
    "plugins": ...
}

The output in the article's XML will look similar to this for an Image using generic properties:

<object id="MTI1LDIyNiw3OSw5OQ" type="x-im/image" uuid="5f720706-0f79-531c-be69-55dcb574a90b">
    <links>
        <link rel="self" type="x-im/image" uri="im://image/XabjbUPYd8tv-myp4VW4STU--XM.jpg" uuid="5f720706-0f79-531c-be69-55dcb574a90b">
            <data>
                <width>2048</width>
                <height>1360</height>
                <imageInstructions/>
                <text/>
                <credit/>
            </data>
        </link>
    </links>
    <properties>
        <property name="position" value="left"/>
        <property name="fullwidth" value="1"/>
    </properties>
</object>

As stated earlier, each plugin can have one unique setup for generic properties, or you can share the same configuration between different plugins (image/image gallery for example).

For example content-part, our fact box plugin, have one general configuration for the entire plugin.