Cannot read property 'replace' of undefined

5 posts, 2 answers
  1. Rajiv
    Rajiv avatar
    16 posts
    Member since:
    Aug 2018

    Posted 01 Jul 2019 Link to this post

    Hi,

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

     

    Please help me.

     

    Thanks,

    Rajiv

  2. Answer
    Rumen
    Admin
    Rumen avatar
    14275 posts

    Posted 01 Jul 2019 Link to this post

    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.
  3. Rajiv
    Rajiv avatar
    16 posts
    Member since:
    Aug 2018

    Posted 02 Jul 2019 in reply to Rumen Link to this post

    Hi Rumen,

     

    Thanks for your quick  response.

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

     

    Thanks,

    Rajiv

  4. Answer
    Rumen
    Admin
    Rumen avatar
    14275 posts

    Posted 02 Jul 2019 Link to this post

    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.
  5. Rajiv
    Rajiv avatar
    16 posts
    Member since:
    Aug 2018

    Posted 02 Jul 2019 in reply to Rumen Link to this post

    Thanks Rumen.

    working fine.

Back to Top