diff --git a/packages/builder/src/components/common/bindings/BindingSidePanel.svelte b/packages/builder/src/components/common/bindings/BindingSidePanel.svelte index 251bf19b49..513be45692 100644 --- a/packages/builder/src/components/common/bindings/BindingSidePanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingSidePanel.svelte @@ -145,9 +145,11 @@ return } popoverAnchor = target + + const doc = new DOMParser().parseFromString(helper.description, "text/html") hoverTarget = { type: "helper", - description: helper.description, + description: doc.body.textContent || "", code: getHelperExample(helper, mode === BindingMode.JavaScript), } popover.show() @@ -241,20 +243,19 @@ > {#if hoverTarget.description}
- - {@html hoverTarget.description} + {hoverTarget.description}
{/if} {#if hoverTarget.code} - {#if mode === BindingMode.JavaScript} + {#if mode === BindingMode.Text || (mode === BindingMode.JavaScript && hoverTarget.type === "binding")} + +
{@html hoverTarget.code}
+ {:else} - {:else if mode === BindingMode.Text} - -
{@html hoverTarget.code}
{/if} {/if}