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

ajax spell checker with multiple MVC Editor

1 Answer 85 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 29 Mar 2012, 11:32 PM
I'm having trouble initializing the spell check on mulitiple mvc editor controls.
I was able to init the speller check on 1 editor control by following the example on
http://www.telerik.com/community/forums/aspnet-mvc/editor/mvc-editor-with-spellcheck.aspx

However, I would like to check all editors.
I'm following the example on:
http://www.telerik.com/help/aspnet-ajax/spell-how-to-mutliple-textareas.html

but I'm not sure how to set the source list with the mvc controls.
i tried:

 

 

var sources =

 

[

new Telerik.Web.UI.Spell.HtmlElementTextSource('PurposeIframe'),

new Telerik.Web.UI.Spell.HtmlElementTextSource('ActivitiesIframe'),

new Telerik.Web.UI.Spell.HtmlElementTextSource('ScopeIframe')

 

];


and also

new Telerik.Web.UI.Spell.HtmlElementTextSource($('#PurposeIframe')),

 

 

 When i call

var

 

 

spell = GetRadSpell('ctl00_ctl00_MainContent_spell1');

 

spell.set_textSource(

 

new MultipleTextSource(sources));

 

spell.startSpellCheck();

 

 

 


i keep getting : No value or innerHTML attribute. Cannot access text.

Thanks in advance,
Michael

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 Apr 2012, 02:12 PM
Hi,

The content area of the MVC editor is an editable iframe and you should get a reference to the iframe and its contents. You can use as a base the solution provided in the following forum thread on the subject: Problem with spellcheck, e.g.

var editorSource = $find('RadEditor1').get_contentAreaElement().contentWindow.document.body;

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
Spell
Asked by
Michael
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or