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

spell check problem

1 Answer 81 Views
Spell
This is a migrated thread and some comments may be shown as answers.
dhrumil
Top achievements
Rank 1
dhrumil asked on 12 Aug 2011, 02:08 PM
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>

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 17 Aug 2011, 09:23 AM
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.

Tags
Spell
Asked by
dhrumil
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or