17

I've been working to integrate ASPNetSpell's spell checker (http://www.aspnetspell.com/) into CKEditor (http://ckeditor.com/). I'm seeing some unsettling behavior between IE 8+, FireFox 12 and Chrome 18.0.1025.152m.

The short of it seems to be that ASPNetSpell can't find the instance of CKEditor in Chrome, but in IE and Firefox it can.

I've followed the recommendation in ASPNetSpell docs to integrate into "all major HTML Editors including FCKEditor, CKEditor, TinyMCE...":

var spellinstance = new LiveSpellInstance();
spellinstance.Fields = "EDITORS";
spellinstance.ServerModel = "aspx";
spellinstance.DrawSpellImageButton();

My understanding is that when you set the Fields to "EDITORS" this instructs ASPNetSpell's client-side script to look for all IFrames.

The modal dialog however does show in Chrome and I do see it make a request to the server, but when it returns to the dialog it's behaving like there were no fields set to spell check. IE and Firefox will behave this way when you have a typo in your Fields to check.

I have the following questions:

  1. Has anyone had any experience with using ASPNetSpell's spell checker in Chrome with an HTML Editor?
  2. Where could I look next?
  3. Why doesn't the modal dialog load the spelling suggestions?

Update

I have sent another email to their support including a link to this post. Hopefully, ASPNETSPELL will come add some expertise.

Clarification

I am aware ASPNETSPELL doesn't support SCAYT (spell check as you type) on a textarea used by the editor. The functionality I am seeking is the explicit spell check done when you click the button.

Update #2

I have downloaded the recent ASPNETSPELL package referenced in ASPNetSpell Support's answer. I am still having no luck getting this to work inside Chrome (current version now is 21.0.1180.89 m). It will work when just validating a textarea with no CKEditor instance attached.

Below is what my Razor view looks like currently.

@using ASPNetSpell
@{  
    Layout = "~/_SiteLayout.cshtml";
    Page.Title = "Welcome to my Web Site!";
}
@{
    ASPNetSpell.Razor.SpellButton mySpellButton = new ASPNetSpell.Razor.SpellButton();
    mySpellButton.InstallationPath = ("/Content/ASPNetSpellInclude");
    mySpellButton.FieldsToSpellCheck = "myTextArea";
}
<p>
    <div id="spellcheckthis">
        <textarea id="myTextArea"></textarea>
    </div>
    <div>
        @Html.Raw(mySpellButton.getHtml())
    </div>
</p>
<script type="text/javascript" src="/scripts/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/scripts/ckeditor/adapters/jquery.js"></script>
<script type="text/javascript">
    $("#myTextArea").ckeditor();
</script>

When I comment out this line line it works.

$("#myTextArea").ckeditor();
Thomas Bates
  • 677
  • 4
  • 15
  • 1
    As someone who's unfamiliar with ASPNetSpell but intrigued by the question, my first step was to investigate that product. Loading `http://www.aspnetspell.com/` froze Chrome, and rendered Firefox nearly unusable. Note I'm on an 8GB 2.7GHz Intel i5 – pretty unsettling. – Barney Sep 20 '12 at 13:03
  • @Barney, what version of chrome are you using? It loads fine with 21.0.1180.89. – Ray Cheng Sep 21 '12 at 23:10
  • 1
    21.0.1180.80. It renders to the point of showing the static example of the demo, but the page is completely static — the cursors doesn't even change on hover. To be fair this is just a performance issue and not specifically relevant to the technical problem the OP's interested in. – Barney Sep 22 '12 at 12:59
  • @Barney haha! you're right, I didn't notice the static example. If I type new content in the demo text editor it keeps showing the marketing jargon. – Thomas Bates Sep 27 '12 at 15:59
  • btw, I did reach out to the creators of ASPNETSPELL, but they haven't responded – Thomas Bates Sep 27 '12 at 15:59
  • Possibly because of the shame of their actual public-facing commercial product demo not being performant enough to work on the fastest browsers with top notch hardware. I'd take it offline if I were them. – Barney Sep 27 '12 at 16:23
  • Why do you even need this? Doesn't the OS already do this? – FlavorScape Sep 28 '12 at 18:31
  • There is a client requirement to have a spellchecker that could be customized to include business vernacular. Even more so the client intends to serve the overall application to other clients and wants those clients to be able to individualize and/or augment the libraries used to spell check against. My understanding is this product would allow you do to so. – Thomas Bates Sep 29 '12 at 12:37

2 Answers2

2

This issue is now resolved. Thanks for reporting a valid issue.

Thanks for the community input! Much appreciated.

The to apply the solution:

  1. Download the package from http://www.aspnetspell.com/ASPNetSpell_Packages
  2. Update your ASPNetSpellInclude directory
  3. Clear all browser caches just to be sure

The clarify Chrome compatibility:

  1. ASPNetSpell supports Chrome alongside Safari, IE6-9, Opera, FireFox etc....
  2. For all rich editors in all browsers, "SpellCheck AS You Type" is not available for rich HTML editors. This is because both technologies override Textareas with an editable DIV element - causing a conflict of interest.
Jake
  • 126
  • 3
  • Thank you, for your answer. I will test it today and report back. – Thomas Bates Oct 01 '12 at 12:23
  • I used your link in your answer to download the latest binaries. It's still not working with the editor. This is where I add a SpellButton and point it to the same textarea as the CKEditor. – Thomas Bates Oct 01 '12 at 15:55
1

If you read the very last line of this page http://www.aspnetspell.com/Rich_HTML_Editors it seems to indicate that spell as you type is not supported for these type of editors... Quote "Only the SpellButton works in this way.... AsYouType cannot work with these editors directly."

Konstantin
  • 3,626
  • 2
  • 33
  • 45
  • I'm confused as to how this answers the question(s) above. SCAYT is different than the modal dialog with suggesstions/highlighted misspellings/etc – Thomas Bates Sep 29 '12 at 15:16