Using pasteHTML in an MSHTML control

Discussion in 'ASP .Net Web Controls' started by John Wallace, Sep 12, 2003.

  1. John Wallace

    John Wallace Guest

    Hi,
    I'm having a problem using "pasteHTML" in an MSHTML control. It's fine
    if plain text is selected and I use:

    var objRange = editor.document.selection.createRange()
    objRange.pasteHTML("my new html");

    However, if I select an <img> control in the existing HMTL, then
    "createRange" returns a "controlRange" object instead of a "textRange"
    object. This doesn't support "pasteHTML" and I can't find a way of
    deriving a "textRange" from my "controlRange" object.

    Is that possible?

    Thanks,
    John
     
    John Wallace, Sep 12, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Wigzell

    pasteHTML

    Simon Wigzell, Apr 19, 2004, in forum: Javascript
    Replies:
    3
    Views:
    122
    Simon Wigzell
    Apr 20, 2004
  2. colinhumber

    pasteHTML not working properly

    colinhumber, Aug 9, 2005, in forum: Javascript
    Replies:
    2
    Views:
    120
    colinhumber
    Aug 9, 2005
  3. colinhumber

    Problems with pasteHTML

    colinhumber, Sep 19, 2005, in forum: Javascript
    Replies:
    6
    Views:
    123
    Randy Webb
    Sep 23, 2005
  4. Rauan Maemirov

    iframe pasteHTML

    Rauan Maemirov, Feb 15, 2008, in forum: Javascript
    Replies:
    3
    Views:
    142
    Rauan Maemirov
    Feb 18, 2008
  5. geevaa

    pasteHTML for Firefox?

    geevaa, May 10, 2008, in forum: Javascript
    Replies:
    1
    Views:
    150
    Bart Van der Donck
    May 12, 2008
Loading...

Share This Page