This is a migrated thread and some comments may be shown as answers.

RadEditor - <summary> with <h4> inside?

1 Answer 21 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 26 Apr 2021, 07:39 PM

An issue was reported to me about the RadEditor moving h4, and related tags, out of <summary> tags.

In looking for information online on if the tag combinations are allowed, I found this link:    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary

Here is the specific example:
    <details open><summary><h4>Overview</h4></summary><ol><li>Cash on hand: $500.00</li><li>Current invoice: $75.30</li><li>Due date: 5/6/19</li></ol></details>

 

When I paste that example into the html editor of the RadEditor it moves the <h4> out of the summary tag and below it.

 

Is that correct behavior?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 27 Apr 2021, 10:31 AM

Hi Charles,

Can you please disable the ConvertToXhtml filter of RadEditor? This will do the trick:

RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml));

You can test the solution at https://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

 

Best Regards,
Rumen
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Charles
Top achievements
Rank 1
commented on 27 Apr 2021, 12:19 PM

Disabling the filter does work but is there a reason the filter would reformat it like that?
Rumen
Telerik team
commented on 27 Apr 2021, 12:31 PM

The ConvertToXhtml filter validates the content against the XHTML standard where the HTML5 details tag is still not available as part of the HTML specification.

You can check the content at https://validator.w3.org/ with XHTML doctype to repro the error. That's why this content breaks the filter functionality and it is better to disable it.

Charles
Top achievements
Rank 1
commented on 27 Apr 2021, 12:40 PM | edited

Oh. Ok.

Unfortunately, we jumped from a 10 year old version to the most recent version.

So this is different from how it used to act 10 years ago. :-)

Thanks!
Rumen
Telerik team
commented on 27 Apr 2021, 01:01 PM

You are welcome! This is a good decision since the latest version ensures support for the latest browsers, improved security, stability, and many new UI components - they are now more than 120 :)
Tags
Editor
Asked by
Charles
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or