SpellCheckAsYouType

SCAYT for InnovaEditor

Installation Guide

1. Download and install Sproxy.

2. Specify SCAYT URI (See sample, line 7).

3. Create a new SCAYT instance when the page loads completely:

var oMySCAYT = new SCAYT({ editor:oMyEditor, name:sMySCAYTName, lang:sInitialLanguage }), where:

oMyEditor {Element, mandatory} — Reference to the target editable iframe object.
sMySCAYTName {String, mandatory} — SCAYT instance name. The name must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]) and underscores ("_").
sInitialLanguage {String, mandatory} — initial spell check language name. Now supported: en, uk, ec, fc, fr, ge, it, el, sp, br, dk, nl, no, pt, se, fi;

See sample, lines 8-23.

To get HTML content without SCAYT-specific HTML tags (i.e. before submitting content, etc.), call the multiSCAYT[sMySCAYTName].clearHTML();: method, where: sMySCAYTName — existing SCAYT instance name; return: StringHTML content without SCAYT-specific HTML tags.

Sample

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>SCAYT for InnovaEditor</title>
  6. <script type="text/javascript" src="editors/InnovaEditor/scripts/innovaeditor.js"></script>
  7. <script type="text/javascript" src="/spellcheck/proxy/sproxy.aspx?cmd=script&doc=scayt"></script>
  8. <script type="text/javascript">
  9. //<!--
  10. window.onload = function(){
  11. if(SCAYT){
  12. var oMyEditor = document.getElementById('idContent' + 'myEditor');
  13. var sMySCAYTName = 'myEditorSCAYT';
  14. var sInitialLanguage = 'en';
  15. var oMySCAYT = new SCAYT({
  16. editor:oMyEditor,
  17. name:sMySCAYTName,
  18. lang:sInitialLanguage
  19. });
  20. }
  21. }
  22. //-->
  23. </script>
  24. </head>
  25. <body>
  26. <textarea id="txtContent" name="txtContent" rows="4" cols="30">
  27. This is an exampl of a sentence with two mispelled words.
  28. </textarea>
  29. <script type="text/javascript">
  30. //<!--
  31. var myEditor = new InnovaEditor("myEditor");
  32. myEditor.REPLACE("txtContent");
  33. //-->
  34. </script>
  35. </body>
  36. </html>

SCAYT Demos

WebSpellChecker