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

Rad Editor adds an extra <br/> tag in chrome

12 Answers 322 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sabby
Top achievements
Rank 1
Sabby asked on 29 Jan 2013, 10:10 AM
Whenver I use this property editorControl.ContentFilters = EditorFilters.ConvertToXhtml;  Chrome appends <br/> to the the text. 

12 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Jan 2013, 03:41 PM
Hello,

Are you able to reproduce the problem in the following demo: Built-in Content Filters? If yes, please provide steps how to do that on my side. If not, please provide a simple working project that demonstrates the issue as well as specify the version of RadEditor in your project.

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Brett
Top achievements
Rank 1
answered on 06 Mar 2013, 09:20 PM
Entered in the HTML content of:
<div class="line1">first line of text</div>
<div class="line2">lastlineoftext</div>
and ended up with an extra BR tag.  This also affects newer builds of FireFox.
0
Nikolay
Telerik team
answered on 11 Mar 2013, 03:02 PM
Hello,

Thank you for reporting this issue.

I was able to reproduce it in Firefox and Chrome. It is looks like related to the ConvertToXhtml filter because if the filter is turned off, the issue is not reproducible.

I logged the issue in our system for detailed research, however I can not provide you with an exact estimation of when it will be fixed. I also updated your Telerik points for your feedback.

Please, excuse us for the inconvenience!

Best regards,
Nikolay
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Sabby
Top achievements
Rank 1
answered on 11 Mar 2013, 03:48 PM
Is there any work around for this issue? get_html() returns the HTML without that extra <br> tag.
0
Rumen
Telerik team
answered on 13 Mar 2013, 04:54 PM
Hello,

The get_html() method returns the content as is provided by the browser. If the true parameter is set get_html(true), the content will be validated and modified by the RadEditor's filters.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Sabby
Top achievements
Rank 1
answered on 15 Apr 2013, 09:05 PM
When this issue will be fixed  ?
0
Slav
Telerik team
answered on 18 Apr 2013, 04:10 PM
Hi Sabby,

As explained below, currently we cannot estimate when the problem will be fixed. You can track the status of the issue via its item in our Ideas & Feedback portal.

For the time being you can try creating a custom content filter, as shown in this online demo. It should allow you to process the editor content and remove the additional br tag.

Greetings,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
esw00
Top achievements
Rank 1
answered on 17 Dec 2013, 02:53 PM
For the time being you can try creating a custom content filter, as shown in this online demo. It should allow you to process the editor content and remove the additional br tag.

While we're all waiting for a fix, perhaps Telerik can create a custom content filter that addresses the issue and link it to this post?
0
Ianko
Telerik team
answered on 18 Dec 2013, 04:27 PM
editabilityHi Eric,

A custom content filter would work fine, although you should note that as suggested by Rumen the content would be stripped only if the get_html(true) is used. Actually if the ConvertToXhtml filter is enabled calling the method with a true value in the overload should work fine.

Note that this <br> element is vital for the normal behavior of the editor. If it does not exist in the content, the user will not be able to select and edit the last row of the content. Respectively, initially the editor has a <br> element and if it is removed, the first line will not be able for typing characters in it.

Also I would like to point out that this element is not inserted with the RadEditor's logic. As you should be aware the editor is an editable iframe element, and as one, Chrome and Firefox adds this <br> for the reasons mentioned above. For the convenience of the users, the ConvertToXhtml removes it when switched to HTML mode and retrieves it back in - Design.

Shortly - if you want to retrieve the HTML content, stripped and cleaned by the filters, you should use the editor.get_html(true) method and for the raw HTML - the editor.get_html() or editor.get_html(false) one.

Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
esw00
Top achievements
Rank 1
answered on 18 Dec 2013, 05:36 PM
Thanks for your reply.  It sounds like the behavior we're experiencing is a little different - basically, some users are ending up with many extra line breaks on save.  I haven't been able to reproduce the issue myself, but if I can then I'll open a ticket.
0
Brian Garson
Top achievements
Rank 2
answered on 06 Jan 2014, 04:04 PM
We are having the same issue in Chrome and Firefox, the easiest way to reproduce it is to toggle back and forth between HTML and Design view on the editor, each toggle will add one BR tag to the bottom of the content.  
0
Ianko
Telerik team
answered on 09 Jan 2014, 08:52 AM
Hello Brian,

Could you try reproducing the described behavior with this online demo and get back with the exact steps. I tried to reproduce it, but to no avail. You can observe the test process with this screencast.

Note that if you are using an older version of the RadControls suite this could be caused by an already fixed bug, which is resolved in the latest available version (2013.3.1114). In this case you can try upgrading the used Telerik's controls. 

Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
Sabby
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Brett
Top achievements
Rank 1
Nikolay
Telerik team
Sabby
Top achievements
Rank 1
Slav
Telerik team
esw00
Top achievements
Rank 1
Ianko
Telerik team
Brian Garson
Top achievements
Rank 2
Share this question
or