Fortinet white logo
Fortinet white logo

Administration Guide

Editing a replacement message

Editing a replacement message

Editor features

There are two panes in the replacement message editor in System > Replacement Messages:

  • Preview

  • Editor

Depending on the display layout that you select from the right, the panes can be hidden or arranged differently. See step 3 in To edit a replacement message.

Any change that you make in the editor pane is reflected instantly in the preview pane.

The code editor supports:

  • Syntax highlighting

    HTML tags, attributes, embedded CSS, and embedded Javascript are colored differently to make it easier to understand the replacement message.

    Variables, e.g., %%<VARIABLE_NAME>%% are highlighted. Variable color indicates validity, e.g., green indicates a valid variable and red indicates error, i.e., the variable was not found.

  • Semantic-aware code folding

    The replacement message code can be collapsed based on the code hierarchy.

  • Hover over the HTML tag to see additional information.

    For example, hovering over %%<VARIABLE_NAME>%% tag gives the example value.

    Hovering on an image tag %%IMAGE:logo_fnet%% gives you a preview of the image.

  • Code suggestion.

    A suggestion is triggered when you insert a text. The suggestion includes HTML tags, attributes, and variables.

    A suggestion pane opens when %% is entered. As you enter more characters the suggestion is filtered. Use up and down arrow to navigate the list. Hit enter to accept a suggestion.

  • Click the arrow beside the line number to expand or collapse.

  • Use Load Default from the top-left to restore the content to its default value.

  • Use Insert Tag to insert %% at the current position of the cursor and trigger suggestions.

  • User Insert Image to insert the image tag at the current position of the cursor and trigger suggestions.

    The Insert Image button is only displayed for HTML type replacement messages.

  • The html or text tag indicates the type of the message.

  • ? used / ? max indicates the current message length and the maximum message length.

    A replacement message cannot exceed the maximum size.

To edit a replacement message:
  1. Go to System > Replacement Messages.
  2. In the Replacement Messages tab, select a message in the replacement message list and then select Edit.

    The Edit Message page opens.

    Here, the Login Page replacement message was selected.

  3. Edit the plain text code in the right pane.

    Click the insert buttons to add variable, image tags, or:

    • Enter %% to show all the available variables.

    • Hit Ctrl + Space to display the auto-completion pane.

    • Use the preview pane to preview the changes in realtime.

    From the options on the right, select:

    • Preview (): Preview the subject.

    • Editor (): Open the plain text code editor.

    • Horizontal Split (): Editor and preview screens are horizontally split.

    • Vertical Split (): Editor and preview screens are vertically split.

  4. To insert a tag, see Inserting a tag.
  5. To insert an image, see Inserting an image.
  6. When you are finished editing the message, select Save to save your changes.
  7. If you have made an error when editing the message, select Load Default to restore the message to its default value.

    See Adding an image.

Editing a replacement message

Editing a replacement message

Editor features

There are two panes in the replacement message editor in System > Replacement Messages:

  • Preview

  • Editor

Depending on the display layout that you select from the right, the panes can be hidden or arranged differently. See step 3 in To edit a replacement message.

Any change that you make in the editor pane is reflected instantly in the preview pane.

The code editor supports:

  • Syntax highlighting

    HTML tags, attributes, embedded CSS, and embedded Javascript are colored differently to make it easier to understand the replacement message.

    Variables, e.g., %%<VARIABLE_NAME>%% are highlighted. Variable color indicates validity, e.g., green indicates a valid variable and red indicates error, i.e., the variable was not found.

  • Semantic-aware code folding

    The replacement message code can be collapsed based on the code hierarchy.

  • Hover over the HTML tag to see additional information.

    For example, hovering over %%<VARIABLE_NAME>%% tag gives the example value.

    Hovering on an image tag %%IMAGE:logo_fnet%% gives you a preview of the image.

  • Code suggestion.

    A suggestion is triggered when you insert a text. The suggestion includes HTML tags, attributes, and variables.

    A suggestion pane opens when %% is entered. As you enter more characters the suggestion is filtered. Use up and down arrow to navigate the list. Hit enter to accept a suggestion.

  • Click the arrow beside the line number to expand or collapse.

  • Use Load Default from the top-left to restore the content to its default value.

  • Use Insert Tag to insert %% at the current position of the cursor and trigger suggestions.

  • User Insert Image to insert the image tag at the current position of the cursor and trigger suggestions.

    The Insert Image button is only displayed for HTML type replacement messages.

  • The html or text tag indicates the type of the message.

  • ? used / ? max indicates the current message length and the maximum message length.

    A replacement message cannot exceed the maximum size.

To edit a replacement message:
  1. Go to System > Replacement Messages.
  2. In the Replacement Messages tab, select a message in the replacement message list and then select Edit.

    The Edit Message page opens.

    Here, the Login Page replacement message was selected.

  3. Edit the plain text code in the right pane.

    Click the insert buttons to add variable, image tags, or:

    • Enter %% to show all the available variables.

    • Hit Ctrl + Space to display the auto-completion pane.

    • Use the preview pane to preview the changes in realtime.

    From the options on the right, select:

    • Preview (): Preview the subject.

    • Editor (): Open the plain text code editor.

    • Horizontal Split (): Editor and preview screens are horizontally split.

    • Vertical Split (): Editor and preview screens are vertically split.

  4. To insert a tag, see Inserting a tag.
  5. To insert an image, see Inserting an image.
  6. When you are finished editing the message, select Save to save your changes.
  7. If you have made an error when editing the message, select Load Default to restore the message to its default value.

    See Adding an image.