3rd Party Textboxes

Static inline spell checking

As you type is not enabled for 3rd party or HTML editors. Generally, to use the static inline spell check, setup spell checking as usual but launch the spell check with rapidSpell.ayt_spellCheck('text box id'), where the text box id is the ID of the editable element - if this is not found the spell checker will look for an editable element.

Dialog spell checking

Generally, to use the dialog spell check, setup spell checking as usual but launch the spell check with rapidSpell.dialog_spellCheck('text box id'), where the text box id is the ID of the editable element - if this is not found the spell checker will look for an editable element.

CKEditor Example (inline & dialog modes)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="/ckeditor_files/ckeditor.js" type="text/javascript"></script>
    <script src="/Keyoti_RapidSpell_Web_Common/RapidSpell-AYT.js" type="text/javascript"></script>
    <script src="/Keyoti_RapidSpell_Web_Common/RapidSpell-DIALOG.js" type="text/javascript"></script>
    
<script type="text/javascript">

    rapidSpell.ayt_staticMode = true;
    rapidSpell.ayt_aytEnabled = false;


    function spell(id, mode) {
        rapidSpell.setParameterValue('default', 'IgnoreXML', true);
        var ifr = document.getElementsByClassName('cke_wysiwyg_frame cke_reset')[0];
        ifr.setAttribute('id', id+'_ifr');
        ifr.id = id+'_ifr';

        if (mode == 'inline')
            rapidSpell.ayt_spellCheck(id + '_ifr')
        else {
            
            rapidSpell.dialog_spellCheck(true, id + '_ifr')
        }
    }

    window.onload = function () {
        CKEDITOR.replace('editor1');       
    };
</script>
</head>
<body>
<form>
<textarea name="editor1"><p>Initial value.</p></textarea>
<input type="button" onclick="spell('editor1', 'inline')" value = 'Inline spell check' />
<input type=button onclick="spell('editor1', 'dialog')" value='Dialog spell check' />
</form>
</body>
</html>

The part in bold adds an id attribute to the CKEditor's iframe, to make it easier for the spell checker to access it.




TinyMCE Example (inline & dialog modes)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head id="Head1" runat="server">
   
    <!-- CDN hosted by Cachefly -->
    <script type="text/javascript" src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script>
    <script type="text/javascript" src="/Keyoti_RapidSpell_Web_Common/RapidSpell-AYT.js"></script>
    <script type="text/javascript" src="/Keyoti_RapidSpell_Web_Common/RapidSpell-DIALOG.js"></script>
    
    <script type="text/javascript">
        tinymce.init({
            height: 160,
            selector: 'textarea',
            toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | mybutton1 mybutton2",
            setup: function (ed) {
                // Add a custom button for inline check
                ed.addButton('mybutton1', {
                    title: 'Inline spell check',
                    context: "tools",
                    image: '../images/abc.png',
                    onclick: function () {
                        rapidSpell.ayt_spellCheck('mytextbox_ifr');
                    }
                });
                // Add a custom button for dialog check
                ed.addButton('mybutton2', {
                    title: 'Dialog spell check',
                    context: "tools",
                    image: '../images/abc.png',
                    onclick: function () {
                        rapidSpell.setParameterValue(document.getElementById('mytextbox_ifr'), 'IgnoreXML', true);
                        rapidSpell.dialog_spellCheck(true, 'mytextbox_ifr');
                    }
                });
            }
        });
        rapidSpell.ayt_staticMode = true;
        rsw_absolutePositionStaticOverlay = true;
       
    </script>
    <title></title>
    <style type="text/css">
       .oldBrowserBox, .oldBrowserBox *
        {
           font-size: 11px !important;
           font-family:Verdana,Arial,Helvetica,sans-serif !important; 
        }  
</style>
</head>
<body>   
        <textarea id='mytextbox' name="S1" ></textarea>
</body>
</html>