ViewHTML is changing HTML entered to form that some email clients do not like

1 Answer 29 Views
Steve Jenkins
Top achievements
Rank 1
Steve Jenkins asked on 16 Nov 2021, 10:43 AM


If I use the ViewHTML feature and add the following:

<div style="background-color:rgb(200, 100, 50);">

After closing the popup and clicking on the ViewHTML button again my code has changed to:

<div style="background-color:#c86432;">

and then the final output from the editor on saving becomes:

<div style="background-color:rgba(200, 100, 50,1);">

Is there any way to tell it not to return rgba type code as the output from the editor is being used for emails and rgba is not working properly in various email clients.

Many thanks,


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 19 Nov 2021, 07:25 AM

Hello Steve,

I created a test page with the Editor to check what the value method returns and the output is always a HEX code:

Typically, in order for the Editor to output rgba colours that means that rgba value is being added initially. However, the steps you illustrated does not include adding color with rgba value.

Can you clarify:

1. How Editor's value is saved, using the value method or some other logic?

2. Is there a step in the case where the users adds manually the rgba value?


Note that HEX with opacity is not yet supported in all browsers and falling back to rgba is considered as normal and expected behaviour.


Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at

Steve Jenkins
Top achievements
Rank 1
commented on 23 Dec 2021, 10:58 AM

Hi Lanko,

Many thanks for your reply and sorry for my late reply. Looking back at the code I found that the output of the editor was actually being fed into a HTMLSanitizer module. It was this module that was converting to RGBA and not the Editor.

Apologies for my mistake and many thanks for replying to my initial request.

Best regards,

Steve Borg

Asked by
Steve Jenkins
Top achievements
Rank 1
Answers by
Telerik team
Share this question