HTML/script

HTML/script is a block you can use for various applications to add extra functionality or content to a page. One example is to add the code for a video, from YouTube, or some other source.

Block settings

The following settings are available for the block:

../../_images/html-settings-v75.png
  • Searchable: I you would like the content in this field to be searchable, select this option (available in Omnia 7.5 and later).

  • ADD CONTENT: You can choose to add some default content to the block. Content can also be edited and added using Write mode.

To add default content, click ADD CONTENT.

The following is shown:

../../_images/html-settings-new2.png

You use it the same way as is described under Add HTML code, below.

Layout and Write

The LAYOUT tab contains general settings, see: General block settings

The WRITE tab is not used for this block.

Add HTML code

To add/edit HTML code in Write mode, click ADD CONTENT.

../../_images/html-add-content-new.png

When you do the following is shown:

../../_images/html-settings-new2.png
  • HTML: Add HTML here.

  • CSS: To set CSS for the content in this field, add it here.

  • Javascript: If Javascript is needed/used, add it here.

The HTML/script block supports api endpoints to the Microsoft Graph and SharePoint REST API. This will make it possible to get data from the Graph and render it using the built-in vue.js framework in Omnia.

Here’s an example:

../../_images/script-html-new-api1-edited.png

General settings

The following settings are available when editing HTML/Script:

../../_images/html-script-general-new.png
  • Title: Add a title for the contents in the field, if needed.

  • Title overaly: If a title overlay is needed, add it in this field.

  • Hidden block: Id the block for some reason should be hidden in reader mode (end user mode), select this option.

  • Run in iFrame: Per default, the HTML/script you add here are run in iFrame. If needed this option can be deselected.

  • iFrame height: If “Run in iFrame” is selected you can set the iFrame height.

  • Run script in edit mode: If the script should be run in reader mode (end user mode) only, select this option.