This is a migrated thread and some comments may be shown as answers.
Enter Key Duplicates Containing Element
2 Answers 4 Views
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 07 Jan 2018, 12:09 AM

In the RadEditor, when the cursor is inside an HTML element (such as a div, h1, span, etc.), and you press the enter key, the containing HTML element is duplicated instead of using <p> elements as expected.

Steps to reproduce:

1. Open an editor and switch to HTML pane.
2. Enter the following HTML:
<div >hello telerik</div>
3. Click Accept.
4. Switch to the Design view.
5. Place the cursor between the two words, and press the Enter key.
6. Switch back to HTML view, and see the result.

Actual Result:

<div >hello</div>
<div >telerik</div>

Desired Result:

<div >
    <p>hello</p>
    <p>telerik</p>
</div>

It works fine if the text is not enclosed in a div. For example, if I start with just the text "hello telerik", and in design view I place the cursor between the two words, and press the Enter key, I get this:

    <p>hello</p>
    <p>telerik</p>

..which is what we want to happen.

Is there a fix for this behavior?

Thanks!

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 22 Jan 2018, 11:56 AM
Anyone?
0
David
Top achievements
Rank 1
answered on 07 Apr 2018, 09:01 PM
Wow, nothing?
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or