How to create a tooltip for the documentation of an ST-element?

The ST-editor shows a tooltip for the documentation of an element, if you hover over this element.
Example for a tooltip shown for a variable:

You are able to define the text that is shown as tooltip for user-defined elements:

  1. Go to the user-defined element for that you want to insert or change a tooltip. If this element is not the declaration, go to its declaration: context menu in ST-editor, Open Declaration

  2. Before the declaration of the element, enter a comment. The comment may have one or more lines.
    If you want to format the text, enter the appropriate HTML-tags (e.g. <br> for a line wrap). Search the Internet for documentation on the HTML-tags.
    Example for comment before the declared variable Init:

    VAR
        /* 'Init' is set to '<b>TRUE</b>' when the program is started. <br>
         * Then 'Init' is used to initialized the hardware.
         */
        Init : BOOL;
    END_VAR
  3. Go back to the usage (e.g. by using the method described under "Finding references for element") and hover over the element in order to display the new/changed tooltip. Or just point to the declared element.
    Example for changed tooltip: