Home Search Member List Faq Register Login  
UltimateEditor
Spellcheck changes lost after postback

Thread Starter: jdeherrera   Started: 04-11-2007 1:48 PM   Replies: 7
 Karamasoft Support Forums » General Discussions » UltimateEditor » Spellcheck changes lost after postback
 Printable Version    « Previous Thread   Next Thread »
  11 Apr 2007, 1:48 PM
jdeherrera is not online. Last active: 7/14/2010 12:59:40 PM jdeherrera

Top 10 Posts
Joined on 04-10-2007
Posts 20
Spellcheck changes lost after postback

I'm trying to combine these two samples: http://www.karamasoft.com/Samples.aspx?component=UltimateSpell&sample=ClientAPI and
http://www.karamasoft.com/UltimateEditor/Samples/SpellAsYouType/SpellAsYouType.aspx.
After the spellcheck is complete, I want to process the corrected text on the server so I've hooked up the spellcheck ClickOK event. What I'm finding, though, is the EditorHtml property contains the text from before the spellcheck changes were applied. Corrections applied using the spell as you type suggestions are there as expected.

What could I be doing wrong?


  
  12 Apr 2007, 12:14 AM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spellcheck changes lost after postback
Please send us sample code to reproduce this behavior in our test environment. You can place your ASPX page content and page code-behind as a reply to this post. Thanks.
  
  12 Apr 2007, 2:36 AM
jdeherrera is not online. Last active: 7/14/2010 12:59:40 PM jdeherrera

Top 10 Posts
Joined on 04-10-2007
Posts 20
Re: Spellcheck changes lost after postback

<%@ Register TagPrefix="cc1" Namespace="Karamasoft.WebControls.UltimateEditor" Assembly="UltimateEditor" %>
<%@ Register TagPrefix="cc2" Namespace="Karamasoft.WebControls.UltimateSpell" Assembly="UltimateSpell" %>
<%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="Sandbox.Web.Default" validateRequest="False" %>
<%@ Register TagPrefix="base" tagname="head" Src="~/Controls/HeadContent.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
 <head>
  <title>Sandbox</title>
  <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
  <meta name="CODE_LANGUAGE" content="C#">
  <meta name="vs_defaultClientScript" content="JavaScript">
  <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
  <base:head id="head" runat="server" />
  <style type="text/css">
   #editor1FontName { WIDTH: 150px }
  </style>
  <script language="javascript" type="text/javascript">
  <!--

  function SubmitClickHandler()
   {   
    // spellcheck if selected
    var checkbox = document.getElementById('<%= chkDoSpellcheck.ClientID %>');
    if (checkbox && checkbox.checked)
    { 
     UltimateSpellClick('spell');
     return false;
    }
    else
    {
     return true;
    }
   }

  // -->
  </script>
 </head>
 <body style="margin:20px">
  <form id="frm" method="post" runat="server">
   <cc1:ultimateeditor id="editor1" runat="server" textboxwidth="600" editorsource="EditorTools.xml" ultimatespellid="spell" />
   <table cellpadding="5" cellspacing="0" border="0" style="margin-top:20px">
    <tr>
     <td nowrap>
      <asp:checkbox id="chkDoSpellcheck" runat="server" checked="True" text="Do Spell Check" />
     </td>
     <td>
      <aspBig Smileropdownlist id="lstLanguage" runat="server" cssclass="qaInput">
       <asp:listitem value="en-US">English</asp:listitem>
       <asp:listitem value="fr-FR">French</asp:listitem>
      </aspBig Smileropdownlist>
      <cc2:ultimatespell id="spell" runat="server" showspellbutton="false" spellasyoutype="true" PostBackOnOK="true" controlidstocheck="editor1i" />
     </td>
    </tr>
   </table>
   <p><input type="submit" value="Submit" onclick="return SubmitClickHandler();"></p>
   <p><asp:literal id="litHtml" runat="server" /></p>
  </form>
 </body>
</html>




using Karamasoft.WebControls.UltimateEditor;
using System;

namespace Sandbox.Web
{
 public class Default : System.Web.UI.Page
 {
  #region Web Controls
  protected Karamasoft.WebControls.UltimateEditor.UltimateEditor editor1;
  protected System.Web.UI.WebControls.CheckBox chkDoSpellcheck;
  protected System.Web.UI.WebControls.DropDownList lstLanguage;
  protected Karamasoft.WebControls.UltimateSpell.UltimateSpell spell;
  protected System.Web.UI.WebControls.Literal litHtml;
  #endregion

  override protected void OnInit(EventArgs e)
  {
   InitializeComponent();
   base.OnInit(e);
  }
  
  private void InitializeComponent()
  {   
   this.spell.ClickOK += new Karamasoft.WebControls.UltimateSpell.UltimateSpell.ClickOKEventHandler(spell_ClickOK);
  }

  private void spell_ClickOK(object sender, Karamasoft.WebControls.UltimateSpell.ClickOKEventArgs e)
  {
   this.litHtml.Text = this.editor1.EditorHtml;
  }
 }
}


  
  13 Apr 2007, 12:20 AM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spellcheck changes lost after postback

We fixed this issue and will release a new build today. You can download it on Monday.


  
  16 Apr 2007, 2:45 PM
jdeherrera is not online. Last active: 7/14/2010 12:59:40 PM jdeherrera

Top 10 Posts
Joined on 04-10-2007
Posts 20
Re: Spellcheck changes lost after postback
The problem I reported was experienced while evaluating the controls using the trial versions. Will the fix be included in those?
  
  16 Apr 2007, 2:55 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spellcheck changes lost after postback
Trial and full versions work the same. We fixed this problem over the weekend. You need to download and see if it work fine now. You need to uninstall the old one, install th new one, replace the old UlimateSpell.dll and UltimateEditor.dll with the new ones under the bin directory of your app. Replace the include directories for both spell and editor under the root of your app as well. Then rebuild your app.
  
  16 Apr 2007, 4:13 PM
jdeherrera is not online. Last active: 7/14/2010 12:59:40 PM jdeherrera

Top 10 Posts
Joined on 04-10-2007
Posts 20
Re: Spellcheck changes lost after postback
Thanks for the quick reply. I was assuming the changes would be reflected in the trial version, but thought it wise to double-check. Unfortunately, after following your instructions, I'm seeing the same behavior with the sample code I sent previously.

What next?


  
  16 Apr 2007, 11:55 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spellcheck changes lost after postback

We fixed this problem. Please download and install the latest build. You need to uninstall the old one first, install the new one, replace the two dlls under the bin, and the two include directories under the root of your app, and rebuild.


  
 Page 1 of 1 (8 items)
Karamasoft Support Forums » General Discussions » UltimateEditor » Spellcheck changes lost after postback

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2020 Karamasoft LLC. All rights reserved.