C1editor how do you turn off spellcheck

Posted by: john on 10 September 2025, 9:22 pm EST

  • Posted 10 September 2025, 9:22 pm EST

    With C1Editor .net 8 how do I turn off the spellcheck so that it does not underline words misspelled as you type?

  • Posted 11 September 2025, 6:47 am EST

    Hello john,

    We’re sorry, but there’s currently no way to configure spell checking in the Editor or WebView2, which C1Editor is based on.

    You can disable spell checking using HTML by setting the spellcheck attribute to false in the body tag, as follows:

    <body spellcheck="false">...your content...</body>

    Please refer to the attached sample for implementation (see Editor_SpellChecker.zip).

    There’s also a feature request to add spell-checking support in the Editor [Feature Request ID: C1WIN-34022]. We don’t have an ETA for its release yet, but we’ll update you once the feature becomes available.

    Regards,

    Uttkarsh.

  • Posted 12 September 2025, 4:26 am EST

    So if there is no option and we have to do it with the above suggestion, how would you load in an HTML file and then turn of spelling?

    My code would look like:

    Await C1Editor1.LoadDocumentAsync(file_name);

    XXX

    XXX

    Thanks.

    John.

  • Posted 15 September 2025, 7:15 am EST

    Hello John,

    You can simply read your file’s content, parse your HTML, find the “body” tag and set its spellcheck attribute to false. For example:

    private void C1Editor1_C1EditorReady(object? sender, EventArgs e)
    {
        var text = File.ReadAllText("tesla.html");
    
        text = SetSpellCheck(text, false);
    
        var bytes = Encoding.UTF8.GetBytes(text);
        var stream = new MemoryStream(bytes);
        c1Editor1.LoadDocumentAsync(stream);
    }
    
    string SetSpellCheck(string text, bool enable)
    {
        XDocument doc = XDocument.Parse(text);
    
        // Default namespace for XHTML
        XNamespace ns = "http://www.w3.org/1999/xhtml";
    
        XElement? body = doc.Root?.Element(ns + "body");
        if (body != null)
        {
            body.SetAttributeValue("spellcheck", enable);
        }
    
        return doc.ToString();
    }

    Please refer to the attached modified sample for implementation. (see Editor_SpellChecker_Mod.zip)

    Regards,

    Uttkarsh.

  • Posted 21 September 2025, 3:51 am EST

    Thanks. That works perfectly. Definitely would be nicer if you had an option to turn it off. :slight_smile:

  • Posted 22 September 2025, 12:09 am EST

    Hello John,

    Sure.

    As we have already mention, there’s a feature request to add spell-checking support in the Editor itself. So, it might be possible to turn it off as well. [Feature Request ID: C1WIN-34022]

    Rest assured, we’ll update you once the feature becomes available.

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels