Re: FixRangePasteBug error in PasteHTML

  •  11-06-2013, 11:01 AM

    Re: FixRangePasteBug error in PasteHTML

    Finally fixed this after several hours of forum searching and trial and error (the documentation on the client scripting side of things is virtually non-existant). You need to call 'FocusDocument' prior to doing the paste as the editor window seems to lose focus.

     

    i.e.:

     

       function test()
      {
        var ed = document.getElementById('<%= Editor1.ClientID%>');
        ed.FocusDocument();
        ed.PasteHTML('this is a test');
      }

View Complete Thread