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

RadEditor Html Mode breaks when I backspace too far (chrome and IE)

8 Answers 61 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 31 Mar 2020, 05:27 PM

In our application we use a RadEditor with

this.EditModes = EditModes.All

 

and

this.NewLineMode = EditorNewLineModes.P

 

so that the user can write text that is then translated into a paragraph html element. 

We also use this code for formatting options

this.StripFormattingOptions = EditorStripFormattingOptions.MSWordRemoveAll
                        | EditorStripFormattingOptions.ConvertWordLists
                        | EditorStripFormattingOptions.Span;

 

The Problem: For some reason our RadEditor is allowing the user to backspace so far that the <p> element for the NewLineMode actually gets deleted and removed, and the following text that is entered by the user is no longer translated into the paragraph html we need from the html mode. Does anyone know why this might be happening to the RadEditor? Perhaps we have some scripts/styles that are crossing the functionality but I have done a pretty thorough read through and figured it would be worth asking to see if anyone has an idea off the top of their head.

Any help is much appreciated and thank you.

 

Dave

8 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Mar 2020, 07:05 PM

Hi Dave,

Can you please send us a video demonstrating the problem?

Are you also able to replicate it in any of the live demos of RadEditor and in an editable iframe/div element?

Regards,
Rumen
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Dave
Top achievements
Rank 1
answered on 31 Mar 2020, 07:11 PM
Yeah I can send a video, where should I send it to? The allowed extensions for this thread seem to be .gif, .jpg, .jpeg, and .png.
0
Rumen
Telerik team
answered on 31 Mar 2020, 07:12 PM

Thank you!

You can try to rename the video extension to one of the supported formats or to upload it on YouTube, screencast.com or Jing.com.

 

Regards,
Rumen
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Dave
Top achievements
Rank 1
answered on 31 Mar 2020, 07:21 PM

So right now I have a very hacky piece of javascript that attempts to append a child paragraph if the the paragraph was deleted from the RadEditor (this is my attempt at fixing the problem - I'm not too happy with it). Although I would like to know what would allow the RadEditor to flatout remove the <p> when highlighting and backspacing in certain scenarios. My gut feeling is that there's a possiblity we have some style or JS that is screwing up the editor - but maybe there is a setting that I'm missing. Here is a quick video of the <p> tags getting blow away from the RadEditor. 

https://streamable.com/t6l2v

0
Dave
Top achievements
Rank 1
answered on 01 Apr 2020, 01:36 AM

Sorry here is a better video that shows the issue with the RadEditor removing the New Line Mode for <p>

https://streamable.com/n758p

0
Accepted
Rumen
Telerik team
answered on 01 Apr 2020, 09:58 AM

Hi Dave,

Thank you very much for the video. I can say that this is not the default behavior of the control.

Which version do you use? Can you try with the latest one - 2020.1.219 (R1 2020 SP1) which offers the best support for the modern browsers and is very stable.

Do you experience the issue if you remove any custom code attached to RadEditor events?

Is the ConvertToXhtml property turned off?

Are any other built-in content filters disabled? Once again, do you experience the issue in the online demos? For example in the Built-in Content Filters? It might help you to repro the issue by disabling some of the filters?

The questions above will help you troubleshoot the issue and find a suitable solution for it.

Regards,
Rumen
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Dave
Top achievements
Rank 1
answered on 02 Apr 2020, 03:38 PM

Rumen, 

I was able to find out that one of our custom handlers is the issue, although I was naive and didnt think that it could be the problem. Thanks for the help with this, I really appreciate it.

Dave

0
Rumen
Telerik team
answered on 03 Apr 2020, 06:52 AM

You are welcome, Dave! I am happy that the issue is resolved!

 

Regards,
Rumen
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Editor
Asked by
Dave
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Dave
Top achievements
Rank 1
Share this question
or