spell check problem

2 posts, 0 answers
  1. dhrumil
    dhrumil avatar
    1 posts
    Member since:
    Jul 2011

    Posted 12 Aug 2011 Link to this post

    In one of my form @ page load ievent i set radeditor visible=false,
    but in that page after some clientside click event i set radeditor visible=true.

    For this i use custom dictionarysuffix &
    spellchecksettings-spellcheckprovider="PhoneticProvider"

    at that time spell check raise me an error :
    The spell check command not implemented yet..

    But it works fine in other page which having rad editor visible=true

    my code for that ,

     
    <TELERIK:RADEDITOR stripformattingoptions="NoneSupressCleanMessage, Span" id="FTBGoal"
                                                               visible="true" enabled="true" editmodes="Design" height="140px" width="650px"
                                                               toolsfile="~/App_Themes/RadEditorTools.xml" dialoghandlerurl="Telerik.Web.UI.DialogHandler.axd"
                                                               spellchecksettings-ajaxurl="Telerik.Web.UI.SpellCheckHandler.axd" runat="server"
                                                               bordercolor="#333333" borderstyle="Solid" borderwidth="1px" spellchecksettings-spellcheckprovider="PhoneticProvider">
                                                               <CSSFILES>
                                                                   <TELERIK:EDITORCSSFILE value="~/App_Themes/RadEditor.css" />
                                                               </CSSFILES>
                                                           </TELERIK:RADEDITOR>
       <TELERIK:RADSPELL id="RadSpell1" runat="server" buttontype="none" />
       <script type="text/javascript">
           function check(b) {
               Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor) {
               var spell = GetRadSpell('<%= RadSpell1.ClientID %>');
                   spell.spellCheck(new PrometheusTextSource(editor));
                   return false;
               }
               var PrometheusTextSource = function(editor) {
                   this._editor = editor;
                   this.get_text = function() { return this._editor.get_html(); };
                   this.set_text = function(value) { this._editor.set_html(value); };
               }
           }
    </script>
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 17 Aug 2011 Link to this post

    Hello Dhrumil,

    I tested your code and it seems to be working fine on my end: http://screencast.com/t/OU9BEe9KzFE. What I suspect might be causing your issue is that when the server-side Visible property is set to false the control is not rendered at all, thus its scripts and CSS will not be loaded. Then if you set the Visible property to true, especially via AJAX, the scripts may not register properly as only a part of the page will be updated. What I would advise is that you wrap the editor in a div and set its css property display to none and change its visibility via JavaScript. This will also spare a postback and thus will increase the page's performance.


    Best wishes,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top