Radeditor change html tag when I switch to design / html mode

1 Answer 145 Views
Editor
Judy.Wang
Top achievements
Rank 1
Veteran
Judy.Wang asked on 10 Aug 2021, 06:47 PM

Hi Telerik team,

We found an issue for the editor, if we add html tag in the html mode and back to design mode, the tag got changed.

 

How to reproduce it:

1. go to RadEditor Demo page, paste following html to editor "<p><font size="4"><br>
Please join us for the Jefferson Virtual Academy Open Forum* on Zoom to get additional information:<br>
</font></p>"

2. switch to design mode, the html changes to

<p><span style="font-size: 18px;"><br />

Please join us for the Jefferson Virtual Academy Open Forum* on Zoom to get additional information:<br />
</span></p>

 

Is there any way to fix it?

 

Thanks in advance,

 

Lan

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 11 Aug 2021, 07:40 AM

Hi Lan,

All you have to do is to disable the ConvertFontToSpan filter of RadEditor, e.g.

C#

RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertFontToSpan));
This filter changes deprecated font tags to compliant span tags.

Best Regards,
Rumen
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 https://learn.telerik.com/.

Judy.Wang
Top achievements
Rank 1
Veteran
commented on 11 Aug 2021, 01:49 PM

Thank you Rumen!
Tags
Editor
Asked by
Judy.Wang
Top achievements
Rank 1
Veteran
Answers by
Rumen
Telerik team
Share this question
or