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

Multi-line html property issue

11 Answers 89 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lloyd
Top achievements
Rank 1
Lloyd asked on 25 Jun 2013, 10:40 AM
Hi.

We've recently updated our telerik version to 2013.1.417 and an usual issue has started to occur (using the same that worked fine prior to the update).

Basically, when I edit the html and have an element that covers multiple lines where the line break is within the setting of the property then it is interpreted as text when returning to the design tab.

An example of the html I have been using is :
<h1 style="display:block;
font-size:12px">Example</h1>

If anyone has had any similar issues, any information would be highly appreciated.

Thanks

Additional Details
To test whether I was definitely correct about the break occurring due to upgrading the telerik version, I downgraded to 2012.1.215 and the issue was eradicated.

11 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 27 Jun 2013, 03:08 PM
Hello Lloyd,

I tried to reproduce the issue you described, but to no avail. I find both versions working as expected when following your steps. I am attaching to this message two videos that demonstrate the test process of both versions of RadControls with the default RadEditor setup that is shown below. Please examine them and let me know if I am missing something in the testing process or in the configuration of the editor control.
<telerik:RadEditor ID="RadEditor1" runat="server"></telerik:RadEditor>

Note that currently I am guessing as to what your setup is. Please prepare and send a simple, fully runnable project that shows the problem so that I can inspect it locally and provide a more to the point answer. A screen capture of the steps for recreating the issue will also be useful for isolating it.

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
Lloyd
Top achievements
Rank 1
answered on 02 Jul 2013, 02:46 PM
Thank you for your response.

I've since shed some more light on this issue.

It appears to be that I have the ConvertToXhtml ContentFilter disabled. The only issue is, this has always been the case and has only started causing issues since the release stated. Do you know if there is a reason behind this?

This can be replicated here http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx when disabling ConvertToXhtml

Regards,

Lloyd
0
Lloyd
Top achievements
Rank 1
answered on 03 Jul 2013, 09:44 AM
I've just found out that this issue only occurs in Google Chrome.

So in summary, to repeat this issue:
  1. Use Google Chrome
  2. Visit http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx
  3. Un-check ConverToXHtml and select Set Built-in Filters
  4. Enter the html below in the HTML tab (leave the new line)
  5. Move to the Design Tab
  6. Move back to the HTML Tab

<h1 style="display:block;
font-size:12px">Example</h1>

After moving between the tabs, the html tab ends up displaying:
&lt;h1 style="display:block;
font-size:12px"&gt;Example

 Thanks
0
Ianko
Telerik team
answered on 05 Jul 2013, 10:35 AM
Hi Lloyd,

Thank you for contacting us about your question. This behavior is a known issue and we are working on improving it.

The possible workaround is disabling the ConvertCharactersToEntities content filter.
You could do this by adding the following line of code in the code behind:
protected void Page_Load(object sender, EventArgs e)
{
     RadEditor1.DisableFilter(EditorFilters.ConvertCharactersToEntities);
}


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
Lloyd
Top achievements
Rank 1
answered on 05 Jul 2013, 10:42 AM
Thanks for the response Ianko.

My main concern to just disabling a filter would be the knock on effect on other content. If it was simply in place to resolve that specific issue then that would be great. But if it's going to start making an impression on other sections then I don't see this as a work around in my situation. Could you let me know what other areas (if any) that this filter would make an impact on if it were to be enabled/disabled? So that I can make a decision on whether to run with it or not.

Thanks again.
0
Lloyd
Top achievements
Rank 1
answered on 05 Jul 2013, 10:44 AM
Thanks for the response Ianko.

My main concern to just disabling a filter would be the knock on effect on other content. If it was simply in place to resolve that specific issue then that would be great. But if it's going to start making an impression on other sections then I don't see this as a work around in my situation. Could you let me know what other areas (if any) that this filter would make an impact on if it were to be enabled/disabled? So that I can make a decision on whether to run with it or not.

Thanks again.
0
Ianko
Telerik team
answered on 08 Jul 2013, 11:19 AM
Hi Lloyd,

This content filter converts special characters, reserved for HTML rendering, to HTML entities. Actually the browser converts them without this content filter. It is enabled by default only for precaution in case of browser's filter failure. Disabling this filter will not make the application security vulnerable.
 
If you have any concerns after disabling the filter, please let me know.

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
Gary
Top achievements
Rank 1
answered on 20 Aug 2013, 11:06 AM
Hi Ianko,

I have been working with Lloyd on this and the worry we have in regards to disabling this filter is the fact that other reserved characters may not get converted (not wanting to rely on the browser itself).

Is there anything we can do to exclude the new line from being filtered whilst the rest gets filtered?

I understand that this is a known issue, is this likely to be resolved in the near future or do you have a timescale for when it will be resolved as this will help us decide which approach is best?

Thanks,
Gary
0
Ianko
Telerik team
answered on 22 Aug 2013, 02:39 PM
Hi Gary,

You could implement a custom content filter, which converts the desired characters except the new line. This way even disabling the editor's built-in content filter and if the browser's filter fails there would be the custom one for precaution.

More information about such implementation you can find in this online demo.

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
Andrew
Top achievements
Rank 1
answered on 03 Oct 2013, 07:45 PM
We recently upgraded to RADEditor and are having a similar issue.  When you switch back and forth between html view and design view, the html is getting messed up when the html spans multiple lines and there is a style element defined.

Product version: 2013.2.611.40

Example to put in rad editor html view:

<table id="backgroundTable" style="border-collapse:collapse; mso-table-lspace:0pt;
    mso-table-rspace:0pt;" bgcolor="#aca095" border="0" cellpadding="40" cellspacing="0" width="100%">
0
Ianko
Telerik team
answered on 08 Oct 2013, 09:54 AM
Hello Andrew,

There are built-in content filters that are fixing incorrect behavior of the inserted HTML code. Although I am not sure what could cause such problems to occur in your project.

Could you please try reproducing the problem with this online demo and get back to me with the exact steps, so that I could be able to investigate the issue on my end?

You can try upgrading with the latest available release of RadControls as the issue at hand could be fixed.

Also it would be helpful if you could provide more details about:
  • What is the originally set content?
  • What is the result HTML content after switching from/to HTML mode?
  • Are there any custom content filters implemented in the project, that could affect to the content?

Note that a simple, locally runnable project, which demonstrates the problem will help me find why it is encountered.

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
Lloyd
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Lloyd
Top achievements
Rank 1
Gary
Top achievements
Rank 1
Andrew
Top achievements
Rank 1
Share this question
or