Prevent pop-ups when RadEditor Spellcheck is complete & Other minor annoyances

2 Answers 12 Views
Editor Spell
Rodney
Top achievements
Rank 2
Rodney asked on 07 May 2024, 12:34 PM

I know I should create separate questions, but these are all so minor it doesn't seem worthwhile.

  1. Is there a way to prevent the annoying pop-up when the spellcheck is complete? Or if there needs to be one couldn't a RadAlert be used instead of the default browser dialog? At least the look would be more consistent.
  2. Are there parameters that can be used to determine how spellcheck handles capitalization? For instance it thinks "THe" is correct because it's not checking capitalization
  3. How can I increase the width of the pop-up window? I changed the font and now the pop-up is too narrow and the text wraps. It appears the width is set on the element so that was overriding anything I tried to change in the classes being used.

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 07 May 2024, 02:30 PM

Hello,

I understand your concerns and I'll address each of your questions to help streamline the process for you.

Preventing the Spell Check Complete Pop-up

To prevent the default "The Spell Check is complete!" pop-up message check the solution provided by me in this forum reply: https://www.telerik.com/forums/ajaxspellcheck-in-radeditor#4509129

Handling Capitalization in Spell Check

Regarding the spell check handling of capitalization, such as treating "THe" as correct, you can set the <SpellCheckSettings WordIgnoreOptions="UPPERCASE" /> inner tag of RadEditor.

Increasing the Width of the Pop-up Window

To increase the width of the yellow panel, you can override the reAjaxSpellWrapper CSS class:

.reAjaxSpellWrapper {
    padding: 52px 10px 52px 10px;
}

 

    Regards,
    Rumen
    Progress Telerik

    Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
    Rodney
    Top achievements
    Rank 2
    commented on 07 May 2024, 03:09 PM

    Rumen,

    Thank you for the quick response. I haven't tried the first part, But here is what I've done.

    Handling Capitalization in Spell Check

    I added the SpellCheckSettings. It seems to me WordIgnoreOptions="UPPERCASE" is the exact opposite of what I want since I want it toe check THe and tell me that's wrong. But I tried the above and it didn't not flag THe as incorrect. I also tried with NONE, it still doesn't flag it. Is it possible for it to flag it. It is spelled correctly, just the capitalization but most spell checkers will identify this.

    Increasing the Width of the Pop-up Window

    I didn't want to change the size of the yellow area, but the little pop-up with the suggestions.

     

    0
    Rumen
    Telerik team
    answered on 08 May 2024, 07:09 AM

    Hi Rodney,

    Thank you for the clarification!

    Handling Capitalization in Spell Check - You are correct that WordIgnoreOptions="None" is not working as expected. Can you please file a bug report at https://feedback.telerik.com/aspnet-ajax so we can research and fix it? Thank you!

    Increasing the Width of the Pop-up Window - you can override the popup dimensions via these classes:

            <style>
                .reDropDownBody.reAjaxSpellCheck {
                        width: 250px !important;
                        height: 300px !important;
                }
                div.reAjaxSpellCheckSuggestions {
                        height: 200px !important;
                }
            </style>

     

    Regards,
    Rumen
    Progress Telerik

    Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
    Rodney
    Top achievements
    Rank 2
    commented on 08 May 2024, 08:50 AM

    Thank you Rumen, I opened a bug for the spellcheck WordIgnoreOptions. Changing the size of the pop-up window worked wonderfully. 

    The script to remove the pop-up worked too well. I does exactly what you said it would, but now I see there is a need to have some sort of feedback. Just not the browser alert. I added a RadWindowManager and when the spell check is complete use a RadAlert. Looks much better and appears nicely centered on the page perfect update. What I couldn't figure out is when there are no misspellings so it doesn't ever start the spell check and I want to do a popup where it should go.

    Rumen
    Telerik team
    commented on 08 May 2024, 09:22 AM

    Thank you for the bug report!

    As for the scenario with no misspellings you can override the beginSpellCheck function in the spellCheckResult.badWords.length == 0 check:

            Telerik.Web.UI.Editor.AjaxSpellCheck.prototype.beginSpellCheck = function (spellCheckResult) {
                this._setLoadingIconVisible(false);
                this._enableButtons(true);
    
                //New - throw event
                this.raiseEvent("spellCheckStart");
    
                //No mistakes found
                if (spellCheckResult.badWords.length == 0) {
                    this._setVisible(false);
                   // this._setLoadingIconVisible(false);
                    //   this._enableButtons(false);
                    this.finishSpellCheck();
                    radalert('No spelling mistakes found!', 350, 100, 'Spell Check Complete'); // Customize this line as needed
                }
                else {
                    this._spellEngine.initialize(spellCheckResult, this._originalHtml);
                }
            }

    Rodney
    Top achievements
    Rank 2
    commented on 08 May 2024, 11:26 AM

    That worked perfectly. I'll add my two cents worth and say it would be nice if there was an option on the spellcheck tag in RadEditor to use RadAlert instead of Alert. This makes everything tie together much better, themes are applied and it's far more consistent with the look and feel of the application. Much like gridboundbutton columns with confirm lets you choose RadWindow as an option.

    Anyway, thank you so much.

    Tags
    Editor Spell
    Asked by
    Rodney
    Top achievements
    Rank 2
    Answers by
    Rumen
    Telerik team
    Share this question
    or