Add a Button with the Rich Content Editor

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 6 minutes to read
  • Add a Button to trigger actions or redirect users to different content.

    Before you begin

    Role required: sn_cd.content_manager

    Fill in the New content form fields. See Create rich content

    Create the page layout using modules or columns.

    Procedure

    1. Navigate to the canvas by selecting the Open editor button from the Design tab of the New content form.
    2. From the Rich Content Editor canvas, you can use a drag-and-drop method to add a button.
    3. Navigate to Settings tab.
    4. Use any of the following styling settings:
      Table 1. Content styling settings
      Settings field Description
      Styling
      Button type Defines what kind of button you are adding. Your choices are:
      • Primary (default)
      • Secondary
      • Link only

      Selecting a button type pulls from your portal theme settings in order to sync with it. For more information, see Portal configuration.

      Button size Defines the size of your button.

      Selecting a button size pulls from your portal theme settings in order to sync with it. For more information, see Portal configuration.

      Your choices are:
      • X-Small
      • Small
      • Medium (default)
      • Large
      Display Configure the appearance of multiple components within the same column, such as an image and a text component. Select from the following options:
      • Top and bottom (default): Image appears above the other component.
      • Side by side: Image appears with the other component next to it.
      Note:
      For best results, set the same display for the components. For example, if you have an image and text components in a column and want the image to appear on the left and the text to appear at the right, change the Display settings for both components to Side by side.
      Horizontal align Sets the button alignment. Choose from left, center, or right.
      Advanced styling
      Button color Change the color of your button.
      1. Enter the color code that represents the background color you want to appear.
        Note:
        All HTML colors are supported. For more information, see HTML color names.
      2. Or, you can select the color picker (grey square) to the right of the Background Color field.
      3. Click into the color palette that appears.
      4. After selecting a color from the color palette, use the slide bar on the right side to fine tune your color.
      5. Slide the bar up and down.
      6. Use the bottom slide bar to lighten or darken your color.
      Width

      Height

      Adjust the width and height of a button by selecting it and using the Width and Height drop-downs to enter number or use the up and down arrows.
      You can also choose the unit of measure you prefer by selecting the single down arrow key to the left of the up and down arrows. The choices are:
      • auto: Size is based on the content within the tab. If you enter additional text in the tab, the width automatically increases.
      • px: Use pixels as your measurement.
      • %: Use a percentage as your measurement.
      Margin Adjust the margins or the space outside and around the button.

      Use the drop-downs under the Margin section to adjust the margins on the top, bottom, right, and left sides. Just like the width and height, you can choose the unit of measure you prefer by selecting the single down arrow key to the left of the up and down arrows.

      Border Edit the border around the outside of the button.
      Note:
      The border is the outline around the button.

      Width: Use the up and down arrows to adjust the width of the border. Just like the width and height, you can choose the unit of measure you prefer by selecting the single down arrow key to the left of the up and down arrows.

      Style: The format of the border around the button. Select the drop-down to select the type of border you want around the button.

      Color: The color of the border around your button. Select the color of your button using the color palette and slide bars similar to how you select your background color.

      Border radius Use the up and down arrows to adjust the radius of the border. Just like the width and height, you can choose the unit of measure you prefer by selecting the single down arrow key to the left of the up and down arrows.
      Font name Defines the font face used to render characters.

      Click the drop-down arrow to select a different font.

      Font size Sets the size of the font.
      Font weight Determines how bold or light your text appears.

      Click the drop-down arrow to select a different weight.

      Line height Sets the vertical distance between two lines of text.
      Font color Overrides the font color from your portal theme.

      To select a color, enter the hex code or click the color picker (grey square to the right of the font color) and select a color from the color palette.

      Properties
      Button label Text that appears on the button.
      Title Text that appears when a user hovers over the button.
      URL Location of a web page or content. Enter the complete URL address you are targeting when a user selects the button.
      Target Indicates where the button directs the user. Your choices are:
      • This window: Selecting the button opens the content in the same window you have displayed.
      • New window: Selecting the button opens the content in a new window.
    5. Select Save or Save and Finish.
      Selecting Save saves your content and you remain on the Rich Content Editor canvas. Selecting Save and Finish saves your record and returns you to the New content form.

    What to do next

    • Preview your content from the New content form.
      Note:
      Content Preview is designed to provide a general idea of how your content looks. Content may look different once published due to variations in device resolution, theme difference, or mobile app style configuration.
    • (Optional) Translate your content.

      Select a different language to view your session or request a language translation for the content you are creating. For more information, see Language support for Content Experiences and Content Publishing.

      Use the Language settings drop-down menu to select a different language to view your session in or request a language translation for the content you are creating.
      • Switch language: This allows you to switch your system settings language to a different language. This is similar to changing your language at login. For more information, see Switch language for Content Publishing.
      • Translate content: When you activate the sn_cd.enable_localization_framework_integration system property, created content from the Content Library displays the Translate content selection from the Language settings drop-down. This allows you to request translation for the content to the language you selected. For more information, see Integration with Localization Framework.
        Note:
        Only translate content after you are done modifying the content. For best results, we do not recommend that you add or remove components or change the formatting after translation.

        To create rich content that is formatted differently in different languages, duplicate the content and modify the formatting as needed. Then, use Audiences to target the content to users by language. See Audiences

    • Configure a publish plan to control where the content is delivered, the audience, and the period of time it is available: Create a publish plan for your content.