Using pasteHTML in an MSHTML control

J

John Wallace

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top