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

Spellcheck in RadEditor

5 Answers 118 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sambasiva
Top achievements
Rank 1
Sambasiva asked on 02 Jun 2008, 07:45 AM
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.

5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 04 Jun 2008, 10:46 AM
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
0
Ana
Top achievements
Rank 1
answered on 06 Nov 2012, 09:50 AM
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,
0
Rumen
Telerik team
answered on 08 Nov 2012, 09:56 PM
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.
0
Ana
Top achievements
Rank 1
answered on 09 Nov 2012, 06:59 AM
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,
0
Rumen
Telerik team
answered on 13 Nov 2012, 01:25 PM
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.
Tags
Editor
Asked by
Sambasiva
Top achievements
Rank 1
Answers by
George
Telerik team
Ana
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or