Guida utente Annulla

Modify a custom design option

  1. Captivate User Guide
  2. Introduction to Captivate
    1. What's New in Adobe Captivate
    2. Adobe Captivate System Requirements
    3. Adobe Captivate Updates
      1. Adobe Captivate (12.5 update) release notes
      2. Adobe Captivate (12.4 update) release notes
      3. Adobe Captivate (12.3 update) release notes
      4. Adobe Captivate (12.2 update) release notes
      5. Adobe Captivate (12.1 update) release notes
    4. Download Adobe Captivate
    5. Frequently Asked Questions
  3. Add a slide
    1. Slide navigator in Adobe Captivate
    2. Add a conversation slide
    3. Add characters to your Adobe Captivate project
    4. Edit the background image on a slide
    5. Add padding to content blocks and components
    6. Create a long scroll project
  4. Design options in Adobe Captivate
    1. What are design options?
    2. Parts of a design option
    3. Create custom design options
    4. Modify a custom design option
    5. Export a custom design option
    6. Import a custom design option
  5. Add text blocks
    1. Add text to a project
    2. Add Adobe fonts to a project
  6. Add media blocks
    1. Add images to a project
    2. Add videos to a project
    3. Add quotes
    4. Add SVGs to a project
    5. Add web objects to a project
  7. Interactive components
    1. Add a button
    2. Add an input field
    3. Add a radio button group
    4. Add a dropdown
    5. Add a checkbox
  8. Add branding blocks
    1. Add a header to a project
    2. Add a footer to a project
  9. Widgets
    1. Add a Card
    2. Add Tabs
    3. Add a Certificate
    4. Add a Carousel
    5. Add a Hotspot
    6. Add Drag-and-Drop
    7. Add a Timeline
    8. Add Click to Reveal
    9. Add an Accordion
  10. Create quizzes
    1. Add a Multiple-choice question
    2. Add a True or false question
    3. Add a Match the column question
    4. Add a Short answer question
    5. Add a Sequence question
    6. Add question pools and random question slides
    7. Import questions as CSV
  11. Add audio to a project
    1. Add audio
    2. Add closed captions
  12. Interactions
    1. Add interactions to a project
    2. Create interactive video with overlay
    3. Create a slide-level interaction
    4. Create an object-level interaction
  13. Animations
    1. Add animations to a project
  14. Accessibility
    1. Make a project accessible
  15. Customize the timeline
    1. Timeline panel in Adobe Captivate
  16. Customize TOC and Playbar
    1. Table of Contents in Adobe Captivate
  17. Edit project properties
    1. Variables in Adobe Captivate
    2. Preferences
    3. Project dimensions
    4. Themes
  18. Create a simulation project
    1. Simulation
  19. Preview a project
    1. Preview
  20. Share a project for review
    1. Share for review
    2. FAQs and Troubleshooting guide for sharing projects for review   
  21. Publish a project
    1. Publish your project
  22. Upgrade projects in Adobe Captivate
    1. Upgrade projects to the latest version 

Learn about how to modify a custom design option in Adobe Captivate.

Overview

This article contains steps to modify a custom design option using CSS styles along with some examples. As a prerequisite, learn about how to create a custom design option and understand the parts of a design option file.

Topics in this page:

Understand the design option structure

Containers: These are outer most container that houses multiple components, such as titles, subtitles, body text, cards, and images. Customizing an outer container, such as a card that encloses other components, will also impact the style and appearance of the components inside it.  

Item tags: These tags identify each component within a container. To modify the styles for each container, you must first understand the tagging convention within a container and how each slide or content block is structured. This will help you navigate to the correct sections in the design options file, using the tags in the text editor to change the styling properties.

Scarica

Container and tag reference

Here is an example of an image content block and its components along with its corresponding tags. Using these tags, you can locate the sections in the design option JSON file and add your CSS styles or modify the CSS properties.

Image content block compoenents
Tags for each component of an image content block

Custom styles and their implementation

Key name Values Description Required
“tag” String Every container and slide item will have a unique identifier known as tag. It is used to apply preset / customStyles/ appearanceProps on corresponding containers or slide item. Yes
"preset" String Only valid for text blocks. Name of the preset that needs to be applied to element No
"designOptionId" String Name of the design option to apply to an element. Note that this is applicable only for elements which are child nodes or for one of the UICs like Button. No
"customStyles"

Object

Example:

"customStyles": { "all": { /* All CSS properties. */ /* E.g., "flexDirection": "rowReverse" */ },

"desktop": { /* All CSS properties. */ /* Properties to be applied in addition to listed in all section */ }

, "tablet": { /* All CSS properties. */ /* Properties to be applied in addition to listed in all section */ }

, "mobile": { /* All CSS properties. */ /* Properties to be applied in addition to listed in all section */ },

"mobile_landscape": { /* All CSS properties. */ /* Properties to be applied in addition to listed in all section */ }, }

Used to apply CSS style directly on the element or the container. Note that the CSS style name needs to be in camel case. E.g., flex-direction would become flexDirection. No CSS Selectors are allowed. The styles mentioned here are going to be applied directly as CSS styles to the corresponding HTML element  These are not mapped to the Visual properties of the respective container. Because of this very nature, some properties, like “margin” could be out of sync with the Visual properties, like “content-width”.

As a guideline, if something can be controlled via Visual properties, declare these properties under “customProperties” and the rest under “customStyles” as CSS properties.

No
“customProperties”

Object

Refer to customProperties table for further details.

The entries that are present in Visual properties. These are going to be mapped to the respective container's visual properties. For e.g. in the example on to the left, the “fill” property can be used to change the container’s color. Also, “customProperties” may have different values for different content blocks. For example, a button container could have a property by name “no-of-buttons”, which allows one to control the number of buttons to be shown in the container.  No

Custom properties and their implementation

Key Name           Subproperties Description 
     "appearanceProps"     "appearanceProps"  are generic to both card and content blocks. Add this property in design option JSON file if you want to add fill, border, shadow on the container.
“cornerRadius

Card container property only

"cornerRadius": { "type": 1, "value": { "topLeft": 4, "bottomLeft": 4, "bottomRight": 4, "topRight": 4 } },

“fill”

To add a background to a container, use the fill property. The fill property includes the following information:

  1. Type: Specifies the fill type. You can choose from the following options:

    • 1: Solid Fill
    • 2: Image Fill
    • 3: Linear Gradient
    • 4: Radial Gradient
  2. Enabled: A boolean value indicating whether the fill property is enabled.

  3. Props: Contains all the details about the fill, such as color, opacity (alpha), color stops, end points, radial handle points, and background images.

Solid Fill JSON Structure

"fill": {
"type": 1,
"props": {
"color": "<fill color>",(any hex code for color)
"alpha": <color opacity (value ranges from 0 to 1)>
}
}

Image Fill JSON Structure

"fill": {
"type": 2,
"props": {
"backgroundImage": "<image name with extension (ensure the image is in the same directory)>"
}
}

Linear/Radial Gradient JSON Structure

  • Color Stops: Defines the gradient's color at specific positions. Each stop has the following properties:
    • color: The gradient color (in hex format).
    • alpha: The transparency of the color (value ranges from 0 to 1).
    • scaledPosition: The position of the color stop (value ranges from 0 to 1).

"fill": {

"type": <Fill Type (use 3 for Linear Gradient or 4 for Radial Gradient)>,
"props": {
"colorStops": [
{
"color": "cp-color-c7",
"alpha": 1,
"scaledPosition": 0
},
{
"color": "cp-color-c9",
"alpha": 0.5,
"scaledPosition": 1
}
]
}
}

By using the fill property and its associated attributes, you can define various background styles for containers.

“shadow”

Shadows can be added to container elements, such as content blocks or card containers, using the shadow property. The following attributes define the shadow's appearance:

Shadow Properties

  • x: Horizontal offset of the shadow.
  • y: Vertical offset of the shadow.
  • blur: Radius of the shadow blur.
  • color: Shadow color in hex format.
  • type: Specifies the shadow type. For an inner shadow, use 1.
  • alpha: Shadow opacity (value ranges from 0 to 1).
  • enabled: A boolean value to enable (true) or disable (false) the shadow.

Shadow on content block container

The following properties are used to apply a shadow to the container:

  • x: Horizontal offset of the shadow.
  • y: Vertical offset of the shadow.
  • blur: Shadow blur radius.
  • color: Shadow color (hex format).
  • type: Use 1 for inner shadows.
  • alpha: Shadow opacity (0 to 1).
  • enabled: Boolean to enable or disable the shadow.

Example:

"shadow": { "x": 1, "y": 2, "blur": 4, "color": "#b3b3b3", "type": 1, "alpha": 0.5, "enabled": false }

Shadow on Card Container

The following properties are used to add a shadow to the card container:

  • x: Horizontal offset of the shadow.
  • y: Vertical offset of the shadow.
  • blur: Shadow blur radius.
  • color: Shadow color (hex format).
  • enabled: Boolean to enable or disable the shadow.

Example:

"shadow": { "x": 0, "y": 0, "blur": 10, "color": "#666666", "enabled": true }

 

  “border”

Borders can be applied to container elements, such as content blocks or cards, using the border property. The following attributes define the border's appearance:

Border Properties:

  • type: Specifies the border type. Values range from 0 to 5, corresponding to the options in the Charm border dropdown.
  • capType: Defines the border cap type. Values range from 0 to 2.
  • width: Specifies the border width.
  • color: Sets the border color (in hex format).
  • alpha: Determines the border opacity (value ranges from 0 to 1).
  • enabled: A boolean to enable (true) or disable (false) the border.

Example:

"border": { "enabled": false, "color": "cp-color-c4", "width": 8, "type": 0 }

Border Properties for Card Container

  • enabled: A boolean to enable (true) or disable (false) the border.
  • color: Specifies the border color (in hex format).
  • width: Defines the border width.
  • type: Specifies the border type.

Example:

"border": { "enabled": true, "color": "#666666", "width": 5, "type": 1 }

 

“components”  

Changing Component Alignment

  • Each component within the content block has an entry in the components property.
  • The alignment property specifies the alignment of each component and accepts the following values:
    • left
    • right
    • center

Controlling Card Visibility

  • The card property can be used to control the visibility of the card.
  • A value of true enables the card, while false disables it.

Example:
Card Container Properties

The card container holds components or slide items, and you can customize their alignment and visibility using the components property.

Changing Component Alignment

  • Each component within the content block has an entry in the components property.
  • The alignment property specifies the alignment of each component and accepts the following values:
    • left
    • right
    • center

Controlling Card Visibility

  • The card property can be used to control the visibility of the card.
  • A value of true enables the card, while false disables it.

Example

"components": {
"label": {
"alignment": "left"
},
"checkbox": {
"alignment": "left"
},
"buttons": {
"alignment": "left"
},
"card": false
}

“cardPadding”   The card container property allows you to add padding to the card container. It accepts values in pixels, and the padding is applied to all sides of the container
“alignmentAndSpacing” “padding”

You can define padding for any object, card container, or content block using the padding property within the alignmentAndSpacing section.

Padding Properties

  • left: Padding on the left side (in pixels).
  • right: Padding on the right side (in pixels).
  • top: Padding at the top (in pixels or percentage, depending on context).
  • bottom: Padding at the bottom (in pixels or percentage, depending on context).
  • isDTMLinked: A boolean value that determines if padding is linked across different device types (e.g., desktop, tablet, mobile).
  • tablet: Device-specific padding for tablets (e.g., top).
  • mobile: Device-specific padding for mobile devices (e.g., top).

Example: 

"alignmentAndSpacing": { "padding": { "left": 10, "right": 10, "top": 50, "bottom": 50, "isDTMLinked": false, "tablet": { "top": 80 }, "mobile": { "top": 80 } } }

 

“autofit”

Autofit – applicable only for content blocks. This will automatically fit in available space

Example:

"alignmentAndSpacing": { "autoFit": false, "padding": { "left": 10, .... } },

"textProps"  

Applicable only to text blocks. Example:

"customProperties":{

"textProps": {

        "listProps":{

          "listDepth":4,

          "listColor": "#EB2699",

          "listSize":"120%",

          "listType":"OrderedListRoman1"

        }

}

  }

"imageHeight"

"imageAspectRatio"

"imageBehavior"

 

Applies only to image content block and image grid content block. If "imageBehavior" is set to "IG_SCALE", we honor  "imageAspectRatio" to scale the object in different viewports. But if it is set to "IG_FIXED_HEIGHT" , we honor "imageHeight" property.

Example:

{

"customProperties": {

        "alignmentAndSpacing": {

        .....

        "imageHeight": 768,

        "imageAspectRatio": 3.415,

        "imageBehavior": "IG_SCALE"

      }

"videoHeight"  

Applies to only video card container. This defines the height of the video object in the content block. Example:

{"tag": "videoCard",

      "customStyles": {

        ...

        },

             "customProperties": {....

            "videoHeight": 400

      }

    }

 

 "imageHeight"        "minImageHeight"  

Applies to only character and scenario content blocks. 

  •  "imageHeight" - default height of the character in the content block.
  •  "minImageHeight" - on resizing, this is the minimum height that is maintained for the object.


Here is an example:

{

"tag": "character-block-container",

      "customStyles": {

       ......

      "customProperties": {

        "imageHeight": 600,

        "minImageHeight": 200

}

}

 

"position"  

Applies only to question slides' Caption objects. Position defines the position of the captions in the question slide:

  • Top 
  • Middle
  • Bottom

Example:

 {

      "tag": "slide-item-question-caption",

      "customProperties": {

        "position": 1

      },

}

 

Examples of custom design options

Layout changes using CSS grid

To work with CSS Grid, start by locating the parent container element—in this case, the container-image-card (label b)—and changing its display type to grid. 

  1. From Installed location, copy \content_blocks\Image\Single Image Default Design Option  to the custom folder in eLearning Assets and name the folder appropriately. In this example the new name is Custom Single Image design.

  2. Open this folder using any text editor and update the values of name and description fields in localized.json file.

    {
      "en-US": {
        "name": "Custom Test 123",
        "description": "Custom design option For Single Image"
      },
      "fr-FR": {}
    }
    
  3. Add a unique name to the designOptionID and set "isDefault" to false.

    {
      "type": "image",
      "name": "$$name",
      "description": "$$description",
      "version": "1.0",
      "isDefault": false,
      "designOptionId": "Custom test 123",
  4. Locate the tag: "container-image-card"

  5. Set the container flow to grid.

    "tag": "container-image-card",
    
          "customStyles": {
    
            "all": {
    
              "display": "grid",
    
              "gridTemplateColumns": "1fr 1fr",
    
              "gap": "50px"
    
            },
  6. Now to position the components in the grid for image content block, locate the tag : "slide-item-image" and place the image container to the left in the grid. Note that any styling to image container is provided under custom styles of image object with key “imageContainerStyles”.

    "tag": "slide-item-image",
      "customStyles": {
        "all": {
          "imageContainerStyles": {
            "minWidth": "100%",
            "maxWidth": "100%",
            "gridArea": "1 / 1 / span 1 / span 1"
          }
        },
        "tablet": {},
        "mobile": {}
      }
    
    Nota:

    Adding the styles under "all" applies to all device view ports. You can choose to specifically add it under tablet or mobile views as well.

  7. Change the position of the text container inside the grid. Locate the tag: "container-image-text" and add the following styles:

      "tag": "container-image-text",
      "customStyles": {
        "all": {
          "gap": "8px",
          "gridArea": "1 / 2 / span 1 / span 1"
        },
        "tablet": {},
        "mobile": {}
      }
  8. Place the buttons within the "container-image-card" tag in the next row.

    {
          "tag": "container-image-card",
          "customStyles": {..
          },
          "customProperties": {…
          },
          "childNodesCustomStyles": {
            "slide-item-buttons": {
              "all": {
                "gridArea": "2 / 1 / span 1 / span 2"
              },
              "tablet": {},
              "mobile": {}
            }
          }
        }
    
  9. Set the text presets. Presets are part of a theme in Captivate which can be configured within the theme editor.

    Text presets in Visual properties
    Text presets in Visual properties

    Locate the tag: " slide-item-caption" and change the Caption preset to “Heading4”.

    "preset": "text-heading-4",
     "tag": "slide-item-caption",

    Locate the tag: "slide-item-subtitle" and change the Subtitle preset to “Detail 1”.

    "preset": "text-detail-1",
     "tag": "slide-item-subtitle",

Here is a comparison of how the custom design looks compared to the default design option after applying CSS grid changes:

Nota:

Relaunch Captivate to see the changes to the custom design options. These will appear under the Design Options section in Visual properties.

Default design option for single image content block
Custom design option for single image content block

Set custom properties

Custom properties can be accessed and adjusted in the Visual Properties panel for any content block or object. Additionally, these properties can be modified using the design option file. In this example of a custom design for the image content block, we will update a few custom properties.

  1. Enable autofit by setting it to true. When autofit is enabled, the content expands to occupy the entire slide height. We recommend enabling autofit for content blocks used in layout slides, such as image and text content blocks. This is applied to all device viewports.

    Locate the tag: "container-image," then under "customProperties," set autoFit to true.

    "tag": "container-image",
      "customStyles": {
        ....
      }
      "customProperties": {
        "alignmentAndSpacing": {
          .....
          "autoFit": true
        }
      }
  2. Under the same tag: "container-image," then under "customProperties, "set imageHeight and imageBehavior.

    "imageBehavior": "IG_TILE_CENTRE",
    “imageHeight": 768,
  3. Align the caption and subtitle text to the center by modifying the customProperties for the "container-image-card," the parent container that holds these text elements. Locate the "container-image-card" tag in the design option file to do this. Under the customProperties section, find the components and update their alignment settings to center.

    "tag": "container-image-card",
          "customStyles": {
            "all": {
              "display": "grid",
              "gridTemplateColumns": "1fr 1fr",
              "gap": "50px"
    
            },
            "tablet": {},
            "mobile": {}
          },
          "customProperties": {
            "components": {
              "image": {
                "alignment": "left"
              },
              "caption": {
                "alignment": "center"
              },
              "subtitle": {
                "alignment": "center"

Here’s a preview of the custom design after applying changes to the custom properties. Start a new project in Captivate, and you’ll notice that the Autofit height is enabled by default, allowing the content to occupy the entire slide height. Additionally, text components like the Caption and Subtitle are centrally aligned.

This image shows the custom properties changes for a custom design option of an image content block
Autofit height and text alignment changes for the custom design option

Set layouts for different viewports

Modify the custom styles for the container image card to optimize its appearance for tablet and mobile views. This ensures a consistent look and feel across different device types.

  1. locate the "tag": "container-image-card" in the designOption.json file and change add the csutom styles for tablet and mobile.

  2. Set the mobile and tablet mode to flex direction.

    "tag": "container-image-card",
        "customStyles": {
            "all": {...},
            "tablet": {
                "display": "flex",
                "flexDirection": "column"
            },
            "mobile": {
                "display": "flex",
                "flexDirection": "column"
            }
        }

Here’s a preview of the custom design for the tablet view after setting the flex direction to "column." Start a new project in Captivate and apply the custom design option to see all the content aligned in a single column.

This image shows the change in tablet view by changing flex direction to column
Tablet view with the flex direction set to column

Reuse design options

A key benefit of creating custom design options is the ability to reuse existing designs in your new custom design options. In this example, the custom image content block design option created in earlier steps will be used as the image for the Introduction slide layout.

  1. From Installed location, copy layouts\Introduction\Introduction default  to the custom folder in eLearning Assets and name the folder appropriately. In this example the new name is Custom Intro slide.

  2. Open the custom introduction layout design option using a text editor and update the values of name and description fields in localized.json file.

    {
      "en-US": {
        "name": "Custom Intro slide",
        "description": "Custom design option For Introduction"
      },
      "fr-FR": {}
    }
  3. Add a unique name to the designOptionID.

    {
      "type": "Introduction",
      "name": "$$name",
      "description": "$$description",
      "designOptionId": "Custom Intro slide",
      "isDefault": false,
      "version": "1.0",
      "thumbnail": "thumbnail.png",
      "styles": [
        {
          "tag": "image",
          "designOptionId": "INTRODUCTION_SINGLE_IMAGE_OPTION"
        }
      ]
    }
  4. Set "isDefault" as false.

  5. Reuse the design option of image content block created earlier and add its unique designOption ID.

    {
      "type": "Introduction",
      "name": "$$name",
      "description": "$$description",
      "designOptionId": "Custom Intro slide",
      "isDefault": false,
      "version": "1.0",
      "thumbnail": "thumbnail.png",
      "styles": [
        {
          "tag": "image",
          "designOptionId": "Custom test 123"
        }
      ]
    }
  6. Start a new project in Captivate and add an Introduction slide.

  7. Select the new custom design option for the Introduction slide from the Visual properties panel.

    This is an image that shows the custom design option for introduction slide
    Custom design option for the Introduction slide reusing a custom image design option

Ottieni supporto in modo più facile e veloce

Nuovo utente?