简体   繁体   中英

check with spell checker control in smith html editor

I'm using a smith html editor to control older version (1.0.0.0). if any latest version is available in the smith html editor. 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

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

in OnVisualEditorDocumentNavigated method

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();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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