We'd like to add some functions like select content from the design view and convert it to a table, or make it upper case or lower case.
For the case changing function, I noticed you have such funtion in "Source" view but not in design view. I also look at the Style, but didn't really change the text. So, I'd like to get the document from the editor and parse and manipulate the content then post it back. Is this the right approach
What exactly are you trying to do There are different ways to extend and interact with the editor, and depending on what you are trying to do there might be different ways to do it.
Actually he probably means the mshtml.IHTMLDocument2 interface. You'll have include the Microsoft.mshtml assembly to use in in your VB project.
I've been looking at a number of threads regarding using the HTML editor (both source and design views) and it's a bit unclear how to manipulate it. Dylan, any info you could provide would be very helpful. I'm sifting through the htmled.dll hoping to find some sort of LanguageService interface or similar that I can use in my package.
Can you describe what you'd like to extend in the editor We'll be able to give you a better idea if something is possible or not when we know what you are trying to do.
Using the automation object, you can use code such as this:
Sub htmlwin() Dim HTMLWin As HTMLWindow dim HTMLWin = DTE.ActiveWindow.Object HTMLWin.CurrentTab = vsHTMLTabs.vsHTMLTabsDesign End Sub
Then the HTMLWin.CurrentTabObject will return an IE HTMLDomDocument object. If you switch this to the text view, it will return a TextDocument object. For your scenario, you will switch to the text view, get the TextDocument object, and then use the automation model to get and set text.
Can we extend HTML editor
Gidon Sela
We'd like to add some functions like select content from the design view and convert it to a table, or make it upper case or lower case.
For the case changing function, I noticed you have such funtion in "Source" view but not in design view. I also look at the Style, but didn't really change the text. So, I'd like to get the document from the editor and parse and manipulate the content then post it back. Is this the right approach
Thanks
Jillaint
Kalaka
This thread is really being answered here now.
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=181800&SiteID=1
Nezo
What exactly are you trying to do There are different ways to extend and interact with the editor, and depending on what you are trying to do there might be different ways to do it.
Thanks,
Dylan
Xtraeme
Actually he probably means the mshtml.IHTMLDocument2 interface. You'll have include the Microsoft.mshtml assembly to use in in your VB project.
I've been looking at a number of threads regarding using the HTML editor (both source and design views) and it's a bit unclear how to manipulate it. Dylan, any info you could provide would be very helpful. I'm sifting through the htmled.dll hoping to find some sort of LanguageService interface or similar that I can use in my package.
hussain990
Could you tell me where is HTMLDomDocument defined I couldn't find any documentation on this object in VS's help.
Thanks,
Jillaint
T-LIANGS
Can you describe what you'd like to extend in the editor We'll be able to give you a better idea if something is possible or not when we know what you are trying to do.
Thanks,
Dylan
cvjr
Ky0suke
Sub htmlwin()
Dim HTMLWin As HTMLWindow
dim
HTMLWin = DTE.ActiveWindow.Object
HTMLWin.CurrentTab = vsHTMLTabs.vsHTMLTabsDesign
End Sub
Then the HTMLWin.CurrentTabObject will return an IE HTMLDomDocument object. If you switch this to the text view, it will return a TextDocument object. For your scenario, you will switch to the text view, get the TextDocument object, and then use the automation model to get and set text.
Craig