ajax spell checker with multiple MVC Editor

2 posts, 0 answers
  1. Michael
    Michael avatar
    7 posts
    Member since:
    Jun 2012

    Posted 29 Mar 2012 Link to this post

    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

  2. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 02 Apr 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top