About HTML Portlets

The HTML portlet displays HTML data on the DivePort page. You can use this portlet to insert text, DivePort variables, web content, or videos that are stored in the DivePort webdata customization/images folder.

Considerations

  • The HTML portlet supports the importing of external JavaScript. If an HTML portlet contains a <script> tag with a src="http://some.external/javascript.js" attribute, DivePort places that JavaScript at the head of the page and executes any in-line script tags after the external scripts have loaded. An external .js file is included just once.
  • Alternatively, you can put that .js file in di/solution/webdata/diveport/customizations/modules/main/javascript (you may need to create those folders). If you do this, then the Javascript will be included with DivePort's main Javascript bundle, and you will not need to load it in the HTML portlet. This is the best way to share scripts between pages.

    NOTE: Be careful about the Javascript you put in the customizations folder. If it fails to parse properly, DivePort will fail.

  • Including a <style> tag, can affect DivePort in unexpected ways.
  • If you are using Microsoft Word to create HTML, be aware that when you save a document as html, a style tag section is automatically generated. You can avoid doing this by using the Save As > Web Page, Filtered option, instead of Save As > Web Page.
  • Be sure to use CSS classes carefully to avoid impacting the DivePort UI.
  • An HTML portlet with an iframe with relative pathing does not support printing its contents. This is because DivePort printing does not fully support documents that are external to DivePort, even if they are hosted through the same Apache Tomcat WAS. The complete URL string can be used, or if this is impractical, create a macro that refers to the full URL. Use of the macro when defining the iframe allows DivePort to process the iframe reference and print its contents.

See also: