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

Rad Editor Ajax Spell Check default Language

4 Answers 142 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nazish
Top achievements
Rank 1
Nazish asked on 02 Oct 2013, 10:12 AM
is there any possibility that instead of en-US we would be able to set our default dictionary to French and on my one Rad Editor only one language would be set and that is French? No English


Telerik team quick response will be appreciated as i need it urgent.


Hi telerik Team


I have found the solution to my above question and that is that i m only binding that language with my Rad spell Editor which i want to like
I have three Rad editors, One for english, second for French and third for Spanish

I m creating those rad editors dynamically in a repeater, and on item Data Bound event I m adding Only one language with each Rad Editor. and no language with English Rad Editor.

English Rad editor is working fine as i only have to click once for for spelling check, but for french and Spanish i need to click twice one for opening a div for language selection and one for selecting language although i have only one language in both cases (Spanish for spanish Rad Editor and French for French Rad Editor)

I want just like English if we can go for spell check in both languages using single click
 Please see attached Image for further detail.



Best Regards;
Nazish Abbasi

4 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 03 Oct 2013, 10:53 AM
Hello Nazish,

You can examine the following demo to see the different ways to set spellchecking languge(s): http://demos.telerik.com/aspnet-ajax/editor/examples/spellchecker/defaultcs.aspx.

Put shortly, if you want only one, that is not the default, you need to first clear the collection to make sure the dropdown does not appear, then set the dictionary the control will use:
RadEditor1.Languages.Clear();
RadEditor1.SpellCheckSettings.DictionaryLanguage = "fr-FR";



Regards,
Marin Bratanov
Telerik
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 the blog feed now.
0
Nazish
Top achievements
Rank 1
answered on 03 Oct 2013, 12:56 PM
Hi Marin Bratanov:

Its really nice to see your answer and it solved my problem,


Thanks a lot.


Best regards
Nazish Abbasi

0
Nazish
Top achievements
Rank 1
answered on 04 Oct 2013, 09:37 AM
Hi Marin:
I m using Telerik with following specs
Problem 1:
<add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.2.1001.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

may be due to this reason i am unable to see Cancel & finish spell check buttons during spell check process

is there any possibility that i can get that cancel spell check functionality or invoke that event manually by clicking on any button
I have seen following examples on following URL but these give me errors like "AJAXSpellCheck undefine"

http://www.telerik.com/community/forums/aspnet-ajax/editor/ajaxspellcheck-in-radeditor.aspx
Problem 2:
I want that spell check button should be disabled By default on all three of my repeaters and by using a checkbox i enable them, Problem is that it enables one of them and do not enables all

i am using following script

 var toggle = [true, true, true];

        function toggleEditing() {
            var i = 0;

            $("textarea[id*=rEditorML]").each(function () {
                if (i < 3) {

                    var editor = $find(this.id);
                    toggle[i] = !toggle[i];
                    editor.enableEditing(toggle[i], Telerik.Web.UI.EditingOptions.All);
                    //editor.get_ContentArea().contentEditable = toggle[i];
         
                    $(".rade_toolZone div ul li:eq(1) a").css("class", "rade_tool");
                    $(".rade_toolZone div ul li:eq(1) a").removeAttr("disabled");
                    i++;
                }
            });

        }


Can u help me in this...


Nazish noor
0
Marin Bratanov
Telerik team
answered on 08 Oct 2013, 08:56 AM
Hi Nazish,

Judging from the handler declaration you are using a very old version of our controls (over 5 years old) and it is simply possible that these buttons are not implemented yet in the version you have. You can easily confirm if this is the case by downloading a trial of the latest version to see if it has the functionality you need.

To call an editor's command with your own JavaScript code, you can use the fire(commandName) method it exposes: http://www.telerik.com/help/aspnet-ajax/editor-fire.html. Here is a list with the commands: http://www.telerik.com/help/aspnet-ajax/editor-toolbar-intro.html and you can see the spellcheck command name.


What I can suggest for disabling spellchecking is checking the jQuery selectors you use and whether they return the expected arrays. At present, the tools can be distinguished by their title attributes and the class on the inner span. I would advise examining the rendered HTML in your browser to see how to access them.

A better approach would be, however, would be using the OnClientCommandExecuting event (http://www.telerik.com/help/aspnet-ajax/editor-onclientcommandexecuting.html) to cancel the spellcheck process according toa custom flag you can raise with your checkbox:
function OnClientCommandExecuting(editor, args){
    if (args.get_commandName() == "AjaxSpellCheck") args.set_cancel(true);
}


Regards,
Marin Bratanov
Telerik
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 the blog feed now.
Tags
Editor
Asked by
Nazish
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Nazish
Top achievements
Rank 1
Share this question
or