Hi,
I want to implement RadSpell to work with the RadEditor, inside a user control.
I cut and paste the code from a previous thread, as follows:
<telerik:radspell id="spell1" runat="server" buttontype="none" />
<telerik:radeditor runat="server" id="RadEditor1" EditModes="All" Height="400px" Skin="Default" StripFormattingOnPaste="None" StripFormattingOptions="None" ToolbarMode="Default" Width="680px">
<tools>
<telerik:editortoolgroup>
<telerik:editortool name="SpellCheck" />
</telerik:editortoolgroup>
</tools>
<content>
There are somee miztakes in this text
</content>
<SpellCheckSettings SpellCheckProvider="PhoneticProvider" WordIgnoreOptions="RepeatedWords" />
</telerik:radeditor>
<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor)
{
var spell = GetRadSpell('<%= spell1.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>
However, when when I click on the spell check button, I get the error 'The command SpellCheck is not implemented yet.'. When I view the source, I can't find any reference to the javascript function.
If I implement the same code outside the user control, everything works fine.
Can you suggest what I'm doing wrong, and how to put it right?
Thanks.
Richard
I want to implement RadSpell to work with the RadEditor, inside a user control.
I cut and paste the code from a previous thread, as follows:
<telerik:radspell id="spell1" runat="server" buttontype="none" />
<telerik:radeditor runat="server" id="RadEditor1" EditModes="All" Height="400px" Skin="Default" StripFormattingOnPaste="None" StripFormattingOptions="None" ToolbarMode="Default" Width="680px">
<tools>
<telerik:editortoolgroup>
<telerik:editortool name="SpellCheck" />
</telerik:editortoolgroup>
</tools>
<content>
There are somee miztakes in this text
</content>
<SpellCheckSettings SpellCheckProvider="PhoneticProvider" WordIgnoreOptions="RepeatedWords" />
</telerik:radeditor>
<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor)
{
var spell = GetRadSpell('<%= spell1.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>
However, when when I click on the spell check button, I get the error 'The command SpellCheck is not implemented yet.'. When I view the source, I can't find any reference to the javascript function.
If I implement the same code outside the user control, everything works fine.
Can you suggest what I'm doing wrong, and how to put it right?
Thanks.
Richard