P4V User Guide (2019.2)

HTML Tools preferences

HTML tools in P4V are tied to the feature property P4V.Features.HTMLTools (for details, see the topic Feature-related P4V properties in the Helix Core Server Administrator Guide: Fundamentals). When this property is turned on (which is the default), P4V can run in the following modes:

  • No HTML Tools: In this mode, neither HTML tools nor applets are enabled. You cannot extend P4V.
  • Enable HTML Tools: In this mode, P4V supports P4VJS and provides the editors to add custom HTML windows and tabs. When P4VJS demos are available in the P4V Resources directory, you can run P4V in P4VJS demo mode. For more information, see the P4VJS User Guide.
  • Allow Applets: In this mode, P4V supports the legacy P4JsApi.
Note

For custom HTML pages that you add using HTML tools, P4V provides additional security by letting you specify a whitelist of base URLs. For example, if the following base URLs are white-listed, P4V only accepts definitions and pages that match these base URLs:

  • http://www.toolserver.com/customtabs
  • http://www.toolserver.com/visualtools
  • http://www.toolserver.com/pages
  • http://www.toolserver.com/tabs

A URL that does not start with the base path listed in these URLs fails with a security exception error. Local files are exempt.

To enable HTML tools in P4V:

  1. Go to Edit > Preferences (Windows) or P4V > Preferences (Mac).
  2. In the Preferences dialog, on the HTML Tools tab, select Enable HTML Tools.
  3. If you want to restrict the locations from which HTML tools can run:

    1. Select the Only accept HTML Tools from check box.
    2. To the right of the Permitted BaseURLs filed, click Add.
    3. In the Accepted BaseURL dialog, in the URL field, specify a URL to whitelist it and click OK.
    4. Repeat steps b and c as needed.
  4. Click OK.
  5. Restart P4V.