简体   繁体   English

在Smith html编辑器中使用拼写检查器控件进行检查

[英]check with spell checker control in smith html editor

I'm using a smith html editor to control older version (1.0.0.0). 我正在使用史密斯html编辑器来控制旧版本(1.0.0.0)。 if any latest version is available in the smith html editor. 史密斯html编辑器中是否有任何最新版本。 how to add with spell checker control in the editor window. 如何在编辑器窗口中使用拼写检查器控件添加。 can you give me a quick response..... 你能给我快速答复吗.....

If you have source code then you make this below code change and it does the spell check. 如果您有源代码,则可以在下面的代码中进行更改,并进行拼写检查。

In HtmlEditor.xaml.cs file add this line HtmlEditor.xaml.cs文件中,添加以下行

VisualEditor.Document.Body.SetAttribute("spellcheck", "true");

in OnVisualEditorDocumentNavigated method OnVisualEditorDocumentNavigated方法中

private void OnVisualEditorDocumentNavigated(object sender, System.Windows.Forms.WebBrowserNavigatedEventArgs e)
{            
        VisualEditor.Document.ContextMenuShowing += this.OnDocumentContextMenuShowing;
        htmldoc = new HtmlDocument(VisualEditor.Document);
        //((IHTMLDocument2)VisualEditor.Document.DomDocument).designMode = "ON";
        SetStylesheet();
        SetInitialContent();
        VisualEditor.Document.Body.SetAttribute("contenteditable", "true");             
        VisualEditor.Document.Body.SetAttribute("spellcheck", "true");
        VisualEditor.Document.Focus();
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM