# Markdown escapeHtml corrupts view when in Designer mode

**URL:** <https://forum.inductiveautomation.com/t/markdown-escapehtml-corrupts-view-when-in-designer-mode/68603>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 15, 2023, 10:17am UTC](https://forum.inductiveautomation.com/t/markdown-escapehtml-corrupts-view-when-in-designer-mode/68603 "2023-01-15T10:17:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 15, 2023, 10:17am UTC](https://forum.inductiveautomation.com/t/markdown-escapehtml-corrupts-view-when-in-designer-mode/68603/1 "2023-01-15T10:17:10Z")

</div>

I'm using the Markdown component as a means of generating a CSS/HTML chart. To do this I have `escapeHtml : false`. This causes the view to get corrupted and rearranges the other components on the view making editing very awkward.

![Markdown escapeHtml](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/b/5b776792703e557127c8729cee3a008fc22a4953.gif)

_The Markdown component is in a flex view. Note how the Markdown container size shrinks when escapeHtml is false and any other components on the view get sucked inside with odd scaling and visibility._

1. Is this a known problem?
2. Is there a fix or a workaround that would make editing a better experience?

For anyone interested in the chart, progress can be tracked on [CSS 3D cuboid gauge](https://forum.inductiveautomation.com/t/css-3d-cuboid-gauge/68522).

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [January 16, 2023, 7:40am UTC](https://forum.inductiveautomation.com/t/markdown-escapehtml-corrupts-view-when-in-designer-mode/68603/2 "2023-01-16T07:40:07Z")

</div>

check my example in the other post, i put in a class to fix this, i think its the same issue atleast.  
escaped html gets wrapped inside an empty div, causing some sizing issues.  
`} .psc-fixMarkdownElementHeight > div{height:100%; width:100%}{`

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/1/8194ba3556bd247211404b580f4cce13138306dc.png)

note sometimes its get wrapped inside a span, which means you are not parsing the html correctly (some newlines or tabs idk), you should fix the parsn-ing, not try to addapt the style to span, span behaves different, its not a block elemt (though you can make it behave like that with `display:inline-block`)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 16, 2023, 9:57am UTC](https://forum.inductiveautomation.com/t/markdown-escapehtml-corrupts-view-when-in-designer-mode/68603/3 "2023-01-16T09:57:25Z")

</div>

Thanks, as always, Victor.

I added `} .psc-fixMarkdownElementHeight > div{height:100%; width:100%}{` to the markdown's props.style.backgroundImage but it didn't make any difference. I didn't code any tags in the markdown HTML and I don't see any when I inspect it in the browser tools.

I'll post the latest version over on [CSS 3D cuboid gauge](https://forum.inductiveautomation.com/t/css-3d-cuboid-gauge/68522) shortly.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [January 16, 2023, 10:31am UTC](https://forum.inductiveautomation.com/t/markdown-escapehtml-corrupts-view-when-in-designer-mode/68603/4 "2023-01-16T10:31:21Z")

</div>

Do you see this?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/0/60fc873b4da20dda5c1de6bd27fdf898cbe5e9e6.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 16, 2023, 2:33pm UTC](https://forum.inductiveautomation.com/t/markdown-escapehtml-corrupts-view-when-in-designer-mode/68603/5 "2023-01-16T14:33:23Z")

</div>

![3D meter 01](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/9/99097689f3189fca6b17f0a3e2926288838589dd.png)

_Figure 1. Here's the setup._

 ![3D meter 02](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/4/549f7f5f925a5cefb3372c88cc7941c01a4ca86c.png)

_Figure 2. Here's the result._

I don't see an empty `<div>`.
