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
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
Our thoughts here at Progress are with those affected by the outbreak.
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
Our thoughts here at Progress are with those affected by the outbreak.
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
Sorry here is a better video that shows the issue with the RadEditor removing the New Line Mode for <p>
https://streamable.com/n758p
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
Our thoughts here at Progress are with those affected by the outbreak.
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
You are welcome, Dave! I am happy that the issue is resolved!
Regards,
Rumen
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.