Problem with html tags inside richtext editor

2025/07/24 3:32 PM

Hey everyone,

I am facing this issue, when saving a lottie player tag, to the richtext editor inside a page type it is replaced with a <br />,

What I need:

<div class="col-xl-6 col-md-7 order-md-2 ms-n5">
	<lottie-player src="/site/json/animation-newsletter-subscribe.json" background="transparent" speed="1" loop autoplay></lottie-player>
</div>

What is saved:

<div class="col-xl-6 col-md-7 order-md-2 ms-n5">
	<br>
</div>

Does someone know how to disable this? or make it work?

Thanks!

Environment

  • Xperience by Kentico version: [30.6.1]

  • .NET version: [8]

  • Execution environment: Private cloud (Azure)]

Tags:
Xperience Administration

Answers

2025/07/24 3:54 PM

I think you need to adjust the allowed HTML elements in the Froala editor.

This is covered in the documentation.

I believe you will need to copy the default values from the docs and explicitly include them in your settings, in addition to any other elements or attributes you want to be allowed. But, double check this.

2025/07/24 3:54 PM
Answer

By default <lottie-player> isn't in the whitelisted tags. You can modify it so it is included. Follow the documentation on this page here:

https://docs.kentico.com/documentation/developers-and-admins/configuration/rich-text-editor-configuration#html-allowed-in-the-editor

2025/07/24 8:31 PM

Thank you Both,

Adding it to the whitelist did the trick

To answer this question, you have to login first.