ganjafarmerIT
Programmer
Hi guys it's me once again, struggeling with a dammned html editor. I can't figure out how to create a reference to the htmlelement that's being selected.
How is it that you can only use mydocument.selection to create a textrange so you can use it to edit the selected text?
<Code>
Dim myHtmlDivelement As HTMLDivElement = DirectCast(myDocument.selection, HTMLDivElement)
</Code>
If I do this it just give me a stupid invalid cast error. I'm really lost right now lol. Just can't figure out which direction to search anymore:S
How is it that you can only use mydocument.selection to create a textrange so you can use it to edit the selected text?
<Code>
Dim myHtmlDivelement As HTMLDivElement = DirectCast(myDocument.selection, HTMLDivElement)
</Code>
If I do this it just give me a stupid invalid cast error. I'm really lost right now lol. Just can't figure out which direction to search anymore:S