Spellcheck in RadEditor

6 posts, 0 answers
  1. Sambasiva
    Sambasiva avatar
    45 posts
    Member since:
    May 2008

    Posted 02 Jun 2008 Link to this post

    During the spell checking, user may or may not chage the content with the available suggestions. My requirement is to find whether the content has been modified or not, after the specll cheker dialog box is dismissed.

    Please let me know how can we acheive this.
  2. George
    Admin
    George avatar
    859 posts

    Posted 04 Jun 2008 Link to this post

    Hi Sambasiva,

    You can achieve the desired behavior with the following code:
    <script type="text/javascript">  
                var content;  
                function OnClientCommandExecuting(editor, args)  
                {  
                   //The command name  
                   var commandName = args.get_commandName();     
                   if(commandName == "AjaxSpellCheck")  
                   {  
                    content = editor.get_text();  
                   }  
                }  
                  
                function OnClientLoad(editor, args)   
                {   
                      
                    //Attach to the spellCheckLoaded event as the spell itself is loaded with AJAX   
                    editor.add_spellCheckLoaded(  
                        function()   
                        {  
                            var spell = editor.get_ajaxSpellCheck();   
                            spell.add_spellCheckEnd(  
                                function(sender, args)   
                                {  
                                    if(content != editor.get_text())  
                                    {  
                                       window.setTimeout(function(){ 
                                       alert("the text was changed");},50);  
                                    }  
                                });  
                        } );  
                    }  
     
            </script>  
            <telerik:radeditor runat="server" ID="RadEditor1" 
                OnClientCommandExecuting="OnClientCommandExecuting" 
                OnClientLoad="OnClientLoad" 
                >  
            </telerik:radeditor>  


    In addition you may review the following example:
    http://www.telerik.com/demos/aspnet/prometheus/Editor/Examples/AutoSave/DefaultCS.aspx


    Sincerely,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Ana
    Ana avatar
    9 posts
    Member since:
    Oct 2011

    Posted 06 Nov 2012 Link to this post

    Hi,

    We are using the spellcheck dictionary feature in the radEditor. The tdf file that is used for the spell check dictionary contains values such as :
    physical:FSKL:FSKL

    We have noticed thought that the spellcheck is not looking intp the acronym sections as well, only the main word. Is there a setting we are missing in order to have the spellcheck look in the acronym section as well?

    Thank you,
  4. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 08 Nov 2012 Link to this post

    Hello,

    Try to enable the phonetic spellcheckprovider and the spellchecker should read the acronym as well, e.g.

    <telerik:RadEditor ID="RadEditor1" runat="server" Language="de-DE" SpellCheckSettings-SpellCheckProvider="PhoneticProvider" />

    Regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Ana
    Ana avatar
    9 posts
    Member since:
    Oct 2011

    Posted 09 Nov 2012 Link to this post

    Hello,

    I have tried your suggestion but the acronyms are still invalidated when the spellcheck fires and the suggestion list appears for them. Here is the markup for the radeditor :

     <telerik:RadEditor runat="server" ID="myEditor" ExternalDialogsPath="~/telerik/EditorDialogs" SpellCheckSettings-DictionaryPath="~/App_Data/RadSpell/" SpellCheckSettings-DictionaryLanguage="mydictionary-us" Language="en-US" SpellCheckSettings-SpellCheckProvider="PhoneticProvider" ToolsFile="~/telerik/ToolsFileTip.xml" EditModes="Design">

    The custom dictionary was created using the classes in the Telerik.Web.UI.Dictionaries and is located in the radspell folder. The spellcheck works OK only for the first word as mentioned in the initial post and the suggestion list appears for FSKL for example which should not happen.

    Is there something I'm missing ? Also the DictionaryImporter class does not find the acronyms when firing the Find method. Is there a solution for that as well?

    Regards,
  6. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 13 Nov 2012 Link to this post

    Hello,

    The text custom dictionary should only one standard word per line without any acronyms. If you want to add new words to the TDF dictionaries you should use the Dictionary Configurator tool. The Dictionary Configurator tool is attached as a web project in the following code-library project: Dictionary Configuration.

    Best regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top