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

Cannot read property 'replace' of undefined

4 Answers 405 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rajiv
Top achievements
Rank 1
Rajiv asked on 01 Jul 2019, 10:38 AM

Hi,

While i try to edit my rad editor it through an error Cannot read property 'replace' of undefined.

 

Please help me.

 

Thanks,

Rajiv

4 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 01 Jul 2019, 10:58 AM
Hi Rajiv,

The MozillaKeepStylesString filter remembers the positions of link tags in the html content. Something in the loaded HTML is breaking it.

To disable it you can run this line of code

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
</telerik:RadEditor>
  
<script type="text/javascript">
    function OnClientLoad(editor, args) {
        editor.get_filtersManager().getFilterByName("MozillaKeepStylesString").set_enabled(false);
    }
</script>


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
Rajiv
Top achievements
Rank 1
answered on 02 Jul 2019, 06:28 AM

Hi Rumen,

 

Thanks for your quick  response.

It works fine for me but i am getting another popup alert.Please find attachment.

 

Thanks,

Rajiv

0
Accepted
Rumen
Telerik team
answered on 02 Jul 2019, 07:12 AM
Hi Rajiv,

This is a private filter which removes http-equiv="refresh" inside a meta tag. You can disable the MetaTagAttributesFilter using the same approach and so on:

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
</telerik:RadEditor>
   
<script type="text/javascript">
    function OnClientLoad(editor, args) {
        editor.get_filtersManager().getFilterByName("MozillaKeepStylesString").set_enabled(false);
        editor.get_filtersManager().getFilterByName("MetaTagAttributesFilter").set_enabled(false);
    }
</script>


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
Rajiv
Top achievements
Rank 1
answered on 02 Jul 2019, 07:43 AM

Thanks Rumen.

working fine.

Tags
Editor
Asked by
Rajiv
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Rajiv
Top achievements
Rank 1
Share this question
or