The html functionality is based on HTML 5.

How to add the html content to the knowledge base

 

Default value

If the content of the html is the output of a relation (e.g. TEMPLATE$) that contains references to parameters yet to be calculated, there is no html available for display until this values are available.

For this situation, the DEFAULT_HTML attribute can be used to define the content of the html.

Default html content
DEFAULT_HTML=|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<body style="font-family: Verdana, Arial,sans-serif">
    Please provide the input value to view the html.
</body>
</html>
|

To make use of this functionality, follow these steps:

  • Add the DEFAULT_HTML in the Data slot of the QHtml5Content in the entity
  • The first character after the equal sign must be used to mark the end of the html content; do NOT use the character inside the html content
  • Add the html content as needed.

How to use files with the html content

Internet files

Any reference made to a file located on the internet must contain the entire url to that file.

For example:

<img src="http://www.marin.nl/static/marinpresentation/img/logo.jpg" alt="MARIN logo">

will display the MARIN logo as it is seen on www.marin.nl.

Local files

Any reference made to a local file from the QHtml5Content parameter must contain the full path on the disk for that specific file.

In the most of the cases, the location of the files that come with the application differs from one installation to another. In order to solve this issue and to prevent the hardcoding of paths, a keyword must be used: !APPLIC. This keyword will be replaced at render time by the correct and full path of the Applic folder from the corresponding knowledge base folder.

The file that is mentioned in the html code must be placed manually to the Applic folder of the knowledge base: My_Knolwedge\kbs\<knowledge base name>\Applic\ .

For example, for a knowledge base called QHtml5Pics stored in the default  My Knowledge location, the following code in the QHtml5Content parameter

<img src="file:///!APPLIC\marin_logo_long.jpg" alt="MARIN logo" height=50>

will produce the following code in the rendered page

<img src="file:///M:\My%20Documents\My_Knowledge\Kbs\_QHTML5PICS\Applic\\MARIN_logo_long.jpg " alt="MARIN logo" height=50>
  • No labels