This is a migrated thread and some comments may be shown as answers.

Suppress complete message

3 Answers 113 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Paul Bacci
Top achievements
Rank 1
Paul Bacci asked on 29 Jul 2010, 08:47 PM
i am using ASP.NET AJAX Q1 2010.   I would like to suppress the javascript confirm dialog when the user clicks the "Add Custom" button.  I would also like to suppress "the spell check is complete" javascript alert box.  How can i achieve this?  I am using the RadSpell control, not the RadEditor built-in spell checker. 

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 04 Aug 2010, 02:06 PM
Hi Paul,

At present, RadSpell does not offer the possibility to suppers the "Add Custom" confirm dialog. However, we will consider the implementation of this functionality but I cannot provide firm estimate.

Regarding the "The Spell Check is Complete!" message, you can suppress the JavaScript alert by setting suppressCompleteMessage property of the event handler's arguments to true, e.g.:
<telerik:RadSpell ID="RadSpell1" runat="server" ControlToCheck="TextBox1" OnClientCheckFinished="OnClientCheckFinished" />
<script type="text/javascript">
    function OnClientCheckFinished(sender, args)
    {
        args.suppressCompleteMessage = true;
    }
</script>


Regards,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Markus Wolff
Top achievements
Rank 1
answered on 05 Sep 2012, 09:22 AM
I'm working with a newer version (2012.1.215.40), still I cannot find an option to disable the 'added to dictionary' alert. I did a little research on the scripts produced by the editor and came to the following solution. Please note, this is only tested with the above version and quite sure to fail with future releases.

//function attached to OnClientLoad
function editorLoaded(editor) {
    editor.add_spellCheckLoaded(function () {
        //override addToCustomDictionary function to suppress confirm message
        //WARNING: This might not work anymore with future versions of Telerik RadControls!
        var spellChecker = editor.get_ajaxSpellCheck();
        spellChecker.addCustomWord = function(a) {
            var e = this.getSpellService();
            var b = this._spellEngine;
            //var c = this._addWordSuccessMessage;
            var d = function() {
                e.remove_complete(d);
                //alert(a+" "+c);
                b.clearWrongWords(a, a);
                var f = b.isHighlightedRemaining();
                if (!f) {
                    b._suggestionDropdown.hide();
                    b.onSpellCheckComplete();
                    return;
                }
                b.moveToNextWrongWord();
            };
            e.add_complete(d);
            e.addCustomWord(a);
        };
    });
}
0
Sam
Top achievements
Rank 1
answered on 19 May 2015, 11:43 AM

In case anyone else has come across this issue, this property was changed to a function in Q1 2015

 http://www.telerik.com/forums/known-issues-and-important-changes

Convert RadSpell args.suppressCompleteMessage field in the clientCheckFinished event to a method.

Tags
Spell
Asked by
Paul Bacci
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Markus Wolff
Top achievements
Rank 1
Sam
Top achievements
Rank 1
Share this question
or