# HTML display

**URL:** <https://community.openhab.org/t/html-display/158473>\
**Category:** UI Widgets\
**Tags:** beta, published\
**Created:** [September 19, 2024, 9:40pm UTC](https://community.openhab.org/t/html-display/158473 "2024-09-19T21:40:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysc](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/e480ec/32.png) [@ysc](https://community.openhab.org/u/ysc)\
**Post date:** [September 19, 2024, 9:40pm UTC](https://community.openhab.org/t/html-display/158473/1 "2024-09-19T21:40:45Z")

</div>

![logo](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/2/7/2769e1b11a2ace67b571bcc827093d82d2a7113b.jpeg)

Allows to display dynamic HTML from the `html` prop - use with expressions to display HTML from item states etc.  
It uses a resizable `f7-text-editor` component without any visible toolbar and adds a div on top of it to “make it non-editable”.

To remove the background color and the border, add it with this:

```plaintext
stylesheet: >
  .text-editor {
    border: 0;
    background: transparent;
  }

```

## Screenshots

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/5/f/5f6e13e3876fea2b27751f346a20a92896b1d473.png)

With the border and background removed as per above, in a card:

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/9/e/9e6fe4ba50015dc64abc74bb9baa960d79907bdb.png)

## Changelog

### Version 0.1

- initial release

## Resources

```yaml
uid: html_display
tags: []
props:
  parameters:
    - label: HTML to display
      name: html
      required: false
      type: TEXT
  parameterGroups: []
component: div
config:
  style:
    position: relative
slots:
  default:
    - component: f7-text-editor
      config:
        position: relative
        buttons: []
        mode: keyboard-toolbar
        resizable: true
        value: =props.html
    - component: div
      config:
        style:
          position: absolute
          top: 0
          height: 100%
          width: 100%
          z-index: 10000

```
