问题
I am working on a VSIX(Visual Studio Extension) project where I am fetching html text from a Service. I need to open the retrieved html text in the Visual Studio Editor. Any idea on how to achieve it or any sample code ?
Thanks
回答1:
You can save the text to a .html file and then open it in the VS editor with DTE.ItemOperations.OpenFile(file);
回答2:
Take a look at AutoFindReplace extension which opens existing files in the editor window. You can download it from the VS Gallery.
来源:https://stackoverflow.com/questions/39414944/how-to-open-the-visual-studio-editor-programmatically-in-a-vsix-project