Problem with html tags inside richtext editor
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)]
Answers
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.
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:
Thank you Both,
Adding it to the whitelist did the trick
To answer this question, you have to login first.