Internet Explorer 9 RC stops my WinForms WebBrowser control to work in editing mode

后端 未结 9 1811
渐次进展
渐次进展 2020-12-09 13:45

Using the IHtmlDocument2.designMode property set to On to switch a WebBrowser control hosted on a Windows Forms form to editing mode suddenly stopp

9条回答
  •  猫巷女王i
    2020-12-09 14:22

    I use HTML Editor Control, I solved this problem adding the DocumentComplete event

    private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
    {
        (((sender as WebBrowser).Document.DomDocument as IHTMLDocument2).body as HTMLBody).contentEditable = "true"; 
    }
    

提交回复
热议问题