Completed
Last Updated: 20 Dec 2018 14:19 by ADMIN
Vinson
Created on: 20 Dec 2018 14:17
Category: UI for ASP.NET AJAX
Type: Bug Report
0
White space only able to replace at the first line when
When I try to replace a white space in RadEditor, it is able to replace the words at the first line. The second one 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.

Reproducible in content which contains table elements and in the live demo: https://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx
1 comment
ADMIN
Rumen
Posted on: 20 Dec 2018 14:19
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.
 

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.