In my efforts to incorporate ASPNetSpell's spell checker () into CKEditor (), I have encountered some unexpected behavior across different browsers - IE 8+, FireFox 12, and Chrome 18.0.1025.152m.
The issue seems to be that in Chrome, ASPNetSpell is unable to locate the CKEditor instance, while it functions correctly in IE and Firefox.
I followed the guidance provided in ASPNetSpell documentation for integration with various HTML editors like FCKEditor, CKEditor, TinyMCE:
var spellinstance = new LiveSpellInstance();
spellinstance.Fields = "EDITORS";
spellinstance.ServerModel = "aspx";
spellinstance.DrawSpellImageButton();
Setting the Fields value to "EDITORS" should instruct ASPNetSpell's client-side script to search for all IFrames.
In Chrome, the modal dialog displays, and a server request is made, but upon returning to the dialog, it behaves as if no fields were set for spell checking. This behavior is consistent with IE and Firefox when there are typos in the Fields intended for checking.
My inquiries are as follows:
- Has anyone successfully used ASPNetSpell's spell checker in Chrome with an HTML Editor?
- What steps can I take next to troubleshoot this issue?
- Why are the spelling suggestions not loading in the modal dialog?
Update:
I have reached out to their support team again, sharing a link to this discussion thread. Hopefully, ASPNETSPELL will provide insights or assistance soon.
Clarification:
It's worth noting that SCAYT (spell check as you type) on a textarea within the editor is not supported by ASPNETSPELL. My objective is specifically focused on explicit spell checking triggered by clicking a button.
Update #2:
After downloading the latest ASPNETSPELL package recommended by ASPNetSpell Support, I am still facing challenges in making it function properly in Chrome (current version 21.0.1180.89 m). It does work without issues when validating just a textarea without any attached CKEditor instance.
Below is how my Razor view currently appears:
@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 the line mentioned above, the functionality works as expected.
$("#myTextArea").ckeditor();