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

RadSpell with RadEditor

4 Answers 172 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Doug Beard
Top achievements
Rank 2
Doug Beard asked on 26 Feb 2008, 03:48 PM
How do we implement the dialog based Prometheus RadSpell with the Prometheus Editor using jscript?  The important distinction between the version provided on this site for a previous version of spellcheker are in the get_text() and set_text() methods.


<div> 
        <telerik:radspell id="RadSpell1" runat="server" buttontype="none" /> 
        <telerik:radeditor runat="server" id="RadEditor1"
         <tools> 
          <telerik:editortoolgroup> 
           <telerik:editortool name="spellcheck" /> 
          </telerik:editortoolgroup> 
         </tools> 
         <content> 
          There are somee miztakes in this text 
         </content> 
        </telerik:radeditor> 
        <script type="text/javascript"
        Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor) 
        { 
         var spell = GetRadSpell('<%= RadSpell1.ClientID %>'); 
         spell.set_textSource(new PrometheusTextSource(editor)) 
         spell.startSpellCheck(); 
         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> 
        </div> 

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 26 Feb 2008, 06:23 PM
Hi Doug,

Here is the requested solution demonstrating how to integrate the RadSpell "Prometheus" dialog in RadEditor "Prometheus" as a custom tool:

<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>


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Doug Beard
Top achievements
Rank 2
answered on 27 Feb 2008, 03:10 PM
Heh, this post was informational, not a request for information.  As you can see my implementation code is similar to your own.  But thanks anyway.
0
Rumen
Telerik team
answered on 27 Feb 2008, 03:29 PM
Hi Doug,

You are correct! Nevertheless, I would like to inform you that we decided to integrate the dialog spellchecker in RadEditor "Prometheus". We will provide a live example too.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Doug Beard
Top achievements
Rank 2
answered on 27 Feb 2008, 03:31 PM
Thats Excellent news!  Thanks
Tags
Spell
Asked by
Doug Beard
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Doug Beard
Top achievements
Rank 2
Share this question
or