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

Id being appended to sibling elements

1 Answer 41 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 13 May 2019, 07:18 PM

Has anyone else had to deal with this or have any recommendations for a workaround?

There is a bug with the editor that is causing it to append multiple elements with the same id.

This is reproducible in latest example pages here: https://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

Steps to reproduce:

  1. Create a div(or h2, etc) element with an id in the html editor e.g. <div id="test">This id will be duplicated</div>
  2. Swap to design mode and click after the div or element you added and hit enter any number of times.
  3. Each new paragraph that is created has the id of its previous sibling e.g. <p id="test">&nbsp;</p>

This is very frustrating for content creators trying to link to sections of a document and it is obviously not valid HTML.

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 16 May 2019, 01:18 PM
Hi Andrew,

This is a browser behavior as you can test and reproduce in an editable div/iframe element at http://dojo.telerik.com/@nlazarov/IFIPAR

The content area of RadEditor is an editable iframe/div and it exhibits the same browser operation of the Enter key command.

The scenario and a solution is discussed at New Line Repeating Class.


Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Editor
Asked by
Andrew
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or