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

White space only able to replace at the first line

4 Answers 17 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vinson
Top achievements
Rank 1
Vinson asked on 17 Dec 2018, 03:58 AM

Hi,

When I try to replace a white space in RadEditor, it only able to replace at the first line, second line and onwards are not able to replace.

Step:

1. Open 'Find And Replace' dialog.

2. Go to 'Replace' tab.

3. Enter a white space for 'Find' text box.

4. Enter any character or word for 'Replace With' text box.

5. Hit on 'Replace All' button.

Notice that only the white spaces at the first line are able to replace. How do I avoid it? I am able to reproduce it in demo site: https://www.telerik.com/forums/aspnet-ajax/general-discussions?newThread=/forums/aspnet-ajax/general-discussions

 

Thank you.

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 19 Dec 2018, 01:46 PM
Hi Vinson,

I tested the provided demo under latest Chrome and was unable to replicate the error. I've recorded my test in the following video. Can you please examine it and let me know if I am missing some step?

Can you provide reliable reproduction steps for this issue? 

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Vinson
Top achievements
Rank 1
answered on 20 Dec 2018, 01:38 AM

Hi Rumen,

Thanks for your reply. There is a mistake in your testing, you should enter a white space in 'Find' text box and enter any character/word in 'Replace With' text box.

I recorded my test in this video: https://www.screencast.com/t/LenScWIIZ

Thank you.

0
Rumen
Telerik team
answered on 20 Dec 2018, 02:01 PM
Hi Vinson,

Thank you for the video!

The problem was verified and is due to the Find and Replace engine of Chrome that the dialog uses.

To fix it, you can instruct the editor to use its built-in engine under Chrome. This engine is cross-browser but for compatibility reason only enabled in Edge. Here is how to proceed:

1) Create a JS file for example named dialog.js and populate it with the following contents:

dialog.js
if (Sys && Sys.Application) {
    Sys.Application.add_init(function () {
        var $T = Telerik.Web.UI;
        var $Editor = $T.Editor;
        
        $Editor.EditorFindReplaceEngine.prototype._supportsFindAPI = function () {
 
            return false;
        }
    });
}

2) Set the DialogsScriptFile property to point to the dialog.js file

<telerik:RadEditor ID="RadEditor1" runat="server" DialogsScriptFile="dialog.js">...

3) Save the files, clear the browser cache and test the solution.

Please test the solution and let me know how it works.

Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Rumen
Telerik team
answered on 20 Dec 2018, 02:21 PM
I also logged the problem in the public bug tracker https://feedback.telerik.com/aspnet-ajax/1380597-white-space-only-able-to-replace-at-the-first-line-when and updated your Telerik points for reporting it.

Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Vinson
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Vinson
Top achievements
Rank 1
Share this question
or