JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.3
[ckeditor.git] / _source / plugins / scayt / plugin.js
index 8486ad9..967767f 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -10,18 +10,19 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
 (function()\r
 {\r
-       var commandName         = 'scaytcheck',\r
-               openPage                = '';\r
+       var commandName  = 'scaytcheck',\r
+               openPage = '';\r
 \r
        // Checks if a value exists in an array\r
-       function in_array(needle, haystack)\r
+       function in_array( needle, haystack )\r
        {\r
-               var found = false, key;\r
-               for (key in haystack)\r
+               var found = 0,\r
+                       key;\r
+               for ( key in haystack )\r
                {\r
-                       if ((haystack[key] === needle) || ( haystack[key] == needle))\r
+                       if ( haystack[ key ] == needle )\r
                        {\r
-                               found = true;\r
+                               found = 1;\r
                                break;\r
                        }\r
                }\r
@@ -34,16 +35,17 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                var createInstance = function() // Create new instance every time Document is created.\r
                {\r
+                       var config = editor.config;\r
                        // Initialise Scayt instance.\r
                        var oParams = {};\r
                        // Get the iframe.\r
                        oParams.srcNodeRef = editor.document.getWindow().$.frameElement;\r
                        // syntax : AppName.AppVersion@AppRevision\r
                        oParams.assocApp  = 'CKEDITOR.' + CKEDITOR.version + '@' + CKEDITOR.revision;\r
-                       oParams.customerid = editor.config.scayt_customerid  || '1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';\r
-                       oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds || '';\r
-                       oParams.userDictionaryName = editor.config.scayt_userDictionaryName || '';\r
-                       oParams.sLang = editor.config.scayt_sLang || 'en_US';\r
+                       oParams.customerid = config.scayt_customerid  || '1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';\r
+                       oParams.customDictionaryIds = config.scayt_customDictionaryIds || '';\r
+                       oParams.userDictionaryName = config.scayt_userDictionaryName || '';\r
+                       oParams.sLang = config.scayt_sLang || 'en_US';\r
 \r
                        // Introduce SCAYT onLoad callback. (#5632)\r
                        oParams.onLoad = function()\r
@@ -62,20 +64,18 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        oParams.onBeforeChange = function()\r
                        {\r
                                if ( plugin.getScayt( editor ) && !editor.checkDirty() )\r
-                                       setTimeout( function(){ editor.resetDirty(); } );\r
+                                       setTimeout( function(){ editor.resetDirty(); }, 0 );\r
                        };\r
 \r
                        var scayt_custom_params = window.scayt_custom_params;\r
-                       if ( typeof scayt_custom_params == 'object')\r
+                       if ( typeof scayt_custom_params == 'object' )\r
                        {\r
                                for ( var k in scayt_custom_params )\r
-                               {\r
                                        oParams[ k ] = scayt_custom_params[ k ];\r
-                               }\r
                        }\r
                        // needs for restoring a specific scayt control settings\r
-                       if ( plugin.getControlId(editor) )\r
-                               oParams.id = plugin.getControlId(editor);\r
+                       if ( plugin.getControlId( editor ) )\r
+                               oParams.id = plugin.getControlId( editor );\r
 \r
                        var scayt_control = new window.scayt( oParams );\r
 \r
@@ -85,7 +85,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        } );\r
 \r
                        // Copy config.\r
-                       var     lastInstance = plugin.instances[ editor.name ];\r
+                       var lastInstance = plugin.instances[ editor.name ];\r
                        if ( lastInstance )\r
                        {\r
                                scayt_control.sLang = lastInstance.sLang;\r
@@ -95,15 +95,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                        plugin.instances[ editor.name ] = scayt_control;\r
 \r
-                       //window.scayt.uiTags\r
-                       var menuGroup = 'scaytButton';\r
-                       var uiTabs = window.scayt.uiTags;\r
-                       var fTabs  = [];\r
-\r
-                       for (var i = 0,l=4; i<l; i++)\r
-                           fTabs.push( uiTabs[i] && plugin.uiTabs[i] );\r
-\r
-                       plugin.uiTabs = fTabs;\r
                        try {\r
                                scayt_control.setDisabled( plugin.isPaused( editor ) === false );\r
                        } catch (e) {}\r
@@ -132,7 +123,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                editor.on( 'beforeCommandExec', function( ev )          // Disable SCAYT before Source command execution.\r
                        {\r
-                               if ( (ev.data.name == 'source' ||  ev.data.name == 'newpage') && editor.mode == 'wysiwyg' )\r
+                               if ( ( ev.data.name == 'source' || ev.data.name == 'newpage' ) && editor.mode == 'wysiwyg' )\r
                                {\r
                                        var scayt_instance = plugin.getScayt( editor );\r
                                        if ( scayt_instance )\r
@@ -244,7 +235,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                        {\r
                                                span : function( element )\r
                                                {\r
-                                                       if ( element.attributes.scayt_word && element.attributes.scaytid )\r
+                                                       if ( element.attributes[ 'data-scayt_word' ]\r
+                                                                       && element.attributes[ 'data-scaytid' ] )\r
                                                        {\r
                                                                delete element.name;    // Write children, but don't write this node.\r
                                                                return element;\r
@@ -257,7 +249,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                // Override Image.equals method avoid CK snapshot module to add SCAYT markup to snapshots. (#5546)\r
                var undoImagePrototype = CKEDITOR.plugins.undo.Image.prototype;\r
-               undoImagePrototype.equals =      CKEDITOR.tools.override( undoImagePrototype.equals, function( org )\r
+               undoImagePrototype.equals = CKEDITOR.tools.override( undoImagePrototype.equals, function( org )\r
                {\r
                        return function( otherImage )\r
                        {\r
@@ -298,7 +290,7 @@ CKEDITOR.plugins.scayt =
                        for ( var infoOpt in o )\r
                                this.controlInfo[ editor.name ][ infoOpt ] = o[ infoOpt ];\r
                },\r
-               isControlRestored : function ( editor )\r
+               isControlRestored : function( editor )\r
                {\r
                        if ( editor &&\r
                                        editor.name &&\r
@@ -308,15 +300,15 @@ CKEDITOR.plugins.scayt =
                        }\r
                        return false;\r
                },\r
-               markControlRestore : function ( editor )\r
+               markControlRestore : function( editor )\r
                {\r
-                       this.setControlInfo( editor,{ restored:true } );\r
+                       this.setControlInfo( editor, { restored:true } );\r
                },\r
-               setControlId: function (editor, id)\r
+               setControlId: function( editor, id )\r
                {\r
-                       this.setControlInfo( editor,{ id:id } );\r
+                       this.setControlInfo( editor, { id:id } );\r
                },\r
-               getControlId: function (editor)\r
+               getControlId: function( editor )\r
                {\r
                        if ( editor &&\r
                                        editor.name &&\r
@@ -327,17 +319,17 @@ CKEDITOR.plugins.scayt =
                        }\r
                        return null;\r
                },\r
-               setPaused: function ( editor , bool )\r
+               setPaused: function( editor , bool )\r
                {\r
-                       this.setControlInfo( editor,{ paused:bool } );\r
+                       this.setControlInfo( editor, { paused:bool } );\r
                },\r
-               isPaused: function (editor)\r
+               isPaused: function( editor )\r
                {\r
                        if ( editor &&\r
                                        editor.name &&\r
                                        this.controlInfo[editor.name] )\r
                        {\r
-                               return this.controlInfo[editor.name].paused ;\r
+                               return this.controlInfo[editor.name].paused;\r
                        }\r
                        return undefined;\r
                },\r
@@ -355,10 +347,30 @@ CKEDITOR.plugins.scayt =
                        var scayt_instance = this.getScayt( editor );\r
                        return ( scayt_instance ) ? scayt_instance.disabled === false : false;\r
                },\r
+               getUiTabs : function( editor )\r
+               {\r
+                       var uiTabs = [];\r
+\r
+                       // read UI tabs value from config\r
+                       var configUiTabs = editor.config.scayt_uiTabs || "1,1,1";\r
+\r
+                       // convert string to array\r
+                       configUiTabs = configUiTabs.split( ',' );\r
+\r
+                       // "About us" should be always shown for standard config\r
+                       configUiTabs[3] = "1";\r
+\r
+                       for ( var i = 0; i < 4; i++ ) {\r
+                               uiTabs[i] = (typeof window.scayt != "undefined" && typeof window.scayt.uiTags != "undefined")\r
+                                                               ? (parseInt(configUiTabs[i],10) && window.scayt.uiTags[i])\r
+                                                               : parseInt(configUiTabs[i],10);\r
+                       }\r
+                       return uiTabs;\r
+               },\r
                loadEngine : function( editor )\r
                {\r
-                       // SCAYT doesn't work with Firefox2, Opera.\r
-                       if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 || CKEDITOR.env.opera )\r
+                       // SCAYT doesn't work with Firefox2, Opera and AIR.\r
+                       if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 || CKEDITOR.env.opera || CKEDITOR.env.air )\r
                                return editor.fire( 'showScaytState' );\r
 \r
                        if ( this.engineLoaded === true )\r
@@ -382,7 +394,7 @@ CKEDITOR.plugins.scayt =
                        var protocol = document.location.protocol;\r
                        // Default to 'http' for unknown.\r
                        protocol = protocol.search( /https?:/) != -1? protocol : 'http:';\r
-                       var baseUrl  = 'svc.spellchecker.net/scayt25/loader__base.js';\r
+                       var baseUrl  = 'svc.spellchecker.net/scayt26/loader__base.js';\r
 \r
                        var scaytUrl  =  editor.config.scayt_srcUrl || ( protocol + '//' + baseUrl );\r
                        var scaytConfigBaseUrl =  plugin.parseUrl( scaytUrl ).path +  '/';\r
@@ -450,6 +462,7 @@ CKEDITOR.plugins.scayt =
        {\r
                preserveState : true,\r
                editorFocus : false,\r
+               canUndo : false,\r
 \r
                exec: function( editor )\r
                {\r
@@ -466,7 +479,7 @@ CKEDITOR.plugins.scayt =
                                //   scayt_control.focus();\r
                                //\r
                                // now focus is set certainly\r
-                               scayt_control.focus( );\r
+                               scayt_control.focus();\r
                                scayt_control.setDisabled( isEnabled );\r
                        }\r
                        else if ( !editor.config.scayt_autoStartup && plugin.engineLoaded >= 0 )        // Load first time\r
@@ -492,58 +505,62 @@ CKEDITOR.plugins.scayt =
 \r
                        if ( items_order && items_order.length )\r
                        {\r
-                               for ( var pos in items_order )\r
+                               for ( var pos = 0 ; pos < items_order.length ; pos++ )\r
                                        items_order_str += 'scayt_' + items_order[ pos ] + ( items_order.length != parseInt( pos, 10 ) + 1 ? ',' : '' );\r
                        }\r
 \r
-                       // Register scayt rbc menu group.\r
-                       if ( editor.config.scayt_contextMenuOntop )\r
-                               // Put it on top of all context menu items\r
-                               editor.config.menu_groups =  items_order_str + ',' + editor.config.menu_groups;\r
-                       else\r
-                               // Put it down\r
-                               editor.config.menu_groups = editor.config.menu_groups + ',' +items_order_str;\r
+                       // Put it on top of all context menu items (#5717)\r
+                       editor.config.menu_groups =  items_order_str + ',' + editor.config.menu_groups;\r
                },\r
 \r
                init : function( editor )\r
                {\r
-                       var moreSuggestions = {};\r
-                       var mainSuggestions = {};\r
+                       // Delete span[data-scaytid] when text pasting in editor (#6921)\r
+                       var dataFilter = editor.dataProcessor && editor.dataProcessor.dataFilter;\r
+                       var dataFilterRules =\r
+                       {\r
+                                       elements :\r
+                                       {\r
+                                                       span : function( element )\r
+                                                       {\r
+                                                                       var attrs = element.attributes;\r
+                                                                       if ( attrs && attrs[ 'data-scaytid' ] )\r
+                                                                                       delete element.name;\r
+                                                       }\r
+                                       }\r
+                       };\r
+                       dataFilter && dataFilter.addRules( dataFilterRules );\r
+\r
+                       var moreSuggestions = {},\r
+                               mainSuggestions = {};\r
 \r
                        // Scayt command.\r
                        var command = editor.addCommand( commandName, commandDefinition );\r
 \r
                        // Add Options dialog.\r
                        CKEDITOR.dialog.add( commandName, CKEDITOR.getUrl( this.path + 'dialogs/options.js' ) );\r
-                       // read ui tags\r
-                       var confuiTabs = editor.config.scayt_uiTabs || '1,1,1';\r
-                       var uiTabs =[];\r
-                       // string to array convert\r
-                       confuiTabs = confuiTabs.split( ',' );\r
-                       // check array length ! always must be 3 filled with 1 or 0\r
-                       for (var i=0,l=3; i<l; i++)\r
-                       {\r
-                               var flag = parseInt(confuiTabs[i] || '1' ,10);\r
-                               uiTabs.push( flag );\r
-                       }\r
+\r
+                       var uiTabs = plugin.getUiTabs( editor );\r
 \r
                        var menuGroup = 'scaytButton';\r
                        editor.addMenuGroup( menuGroup );\r
                        // combine menu items to render\r
-                       var uiMuneItems = {};\r
+                       var uiMenuItems = {};\r
+\r
+                       var lang = editor.lang.scayt;\r
 \r
                        // always added\r
-                       uiMuneItems.scaytToggle =\r
+                       uiMenuItems.scaytToggle =\r
                                {\r
-                                       label : editor.lang.scayt.enable,\r
+                                       label : lang.enable,\r
                                        command : commandName,\r
                                        group : menuGroup\r
                                };\r
 \r
-                       if (uiTabs[0] == 1)\r
-                               uiMuneItems.scaytOptions =\r
+                       if ( uiTabs[0] == 1 )\r
+                               uiMenuItems.scaytOptions =\r
                                {\r
-                                       label : editor.lang.scayt.options,\r
+                                       label : lang.options,\r
                                        group : menuGroup,\r
                                        onClick : function()\r
                                        {\r
@@ -552,10 +569,10 @@ CKEDITOR.plugins.scayt =
                                        }\r
                                };\r
 \r
-                       if (uiTabs[1] == 1)\r
-                               uiMuneItems.scaytLangs =\r
+                       if ( uiTabs[1] == 1 )\r
+                               uiMenuItems.scaytLangs =\r
                                {\r
-                                       label : editor.lang.scayt.langs,\r
+                                       label : lang.langs,\r
                                        group : menuGroup,\r
                                        onClick : function()\r
                                        {\r
@@ -563,10 +580,10 @@ CKEDITOR.plugins.scayt =
                                                editor.openDialog( commandName );\r
                                        }\r
                                };\r
-                       if (uiTabs[2] == 1)\r
-                               uiMuneItems.scaytDict =\r
+                       if ( uiTabs[2] == 1 )\r
+                               uiMenuItems.scaytDict =\r
                                {\r
-                                       label : editor.lang.scayt.dictionariesTab,\r
+                                       label : lang.dictionariesTab,\r
                                        group : menuGroup,\r
                                        onClick : function()\r
                                        {\r
@@ -575,7 +592,7 @@ CKEDITOR.plugins.scayt =
                                        }\r
                                };\r
                        // always added\r
-                       uiMuneItems.scaytAbout =\r
+                       uiMenuItems.scaytAbout =\r
                                {\r
                                        label : editor.lang.scayt.about,\r
                                        group : menuGroup,\r
@@ -584,19 +601,16 @@ CKEDITOR.plugins.scayt =
                                                openPage = 'about';\r
                                                editor.openDialog( commandName );\r
                                        }\r
-                               }\r
-                       ;\r
-\r
-                       uiTabs[3] = 1; // about us tab is always on\r
-                       plugin.uiTabs = uiTabs;\r
+                               };\r
 \r
-                       editor.addMenuItems( uiMuneItems );\r
+                       editor.addMenuItems( uiMenuItems );\r
 \r
                                editor.ui.add( 'Scayt', CKEDITOR.UI_MENUBUTTON,\r
                                        {\r
-                                               label : editor.lang.scayt.title,\r
-                                               title : CKEDITOR.env.opera ? editor.lang.scayt.opera_title : editor.lang.scayt.title,\r
+                                               label : lang.title,\r
+                                               title : CKEDITOR.env.opera ? lang.opera_title : lang.title,\r
                                                className : 'cke_button_scayt',\r
+                                               modes : { wysiwyg : 1 },\r
                                                onRender: function()\r
                                                {\r
                                                        command.on( 'state', function()\r
@@ -609,14 +623,16 @@ CKEDITOR.plugins.scayt =
                                                {\r
                                                        var isEnabled = plugin.isScaytEnabled( editor );\r
 \r
-                                                       editor.getMenuItem( 'scaytToggle' ).label = editor.lang.scayt[ isEnabled ? 'disable' : 'enable' ];\r
+                                                       editor.getMenuItem( 'scaytToggle' ).label = lang[ isEnabled ? 'disable' : 'enable' ];\r
+\r
+                                                       var uiTabs = plugin.getUiTabs( editor );\r
 \r
                                                        return {\r
                                                                scaytToggle  : CKEDITOR.TRISTATE_OFF,\r
-                                                               scaytOptions : isEnabled && plugin.uiTabs[0] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,\r
-                                                               scaytLangs   : isEnabled && plugin.uiTabs[1] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,\r
-                                                               scaytDict    : isEnabled && plugin.uiTabs[2] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,\r
-                                                               scaytAbout   : isEnabled && plugin.uiTabs[3] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED\r
+                                                               scaytOptions : isEnabled && uiTabs[0] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,\r
+                                                               scaytLangs   : isEnabled && uiTabs[1] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,\r
+                                                               scaytDict    : isEnabled && uiTabs[2] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,\r
+                                                               scaytAbout   : isEnabled && uiTabs[3] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED\r
                                                        };\r
                                                }\r
                                        });\r
@@ -627,7 +643,7 @@ CKEDITOR.plugins.scayt =
                                editor.contextMenu.addListener( function( element, selection )\r
                                        {\r
                                                if ( !plugin.isScaytEnabled( editor )\r
-                                                               || selection.getCommonAncestor().isReadOnly() )\r
+                                                               || selection.getRanges()[ 0 ].checkReadOnly() )\r
                                                        return null;\r
 \r
                                                var scayt_control = plugin.getScayt( editor ),\r
@@ -678,7 +694,7 @@ CKEDITOR.plugins.scayt =
                                                                        return {\r
                                                                                exec: function()\r
                                                                                {\r
-                                                                                       scayt_control.replace(el, s);\r
+                                                                                       scayt_control.replace( el, s );\r
                                                                                }\r
                                                                        };\r
                                                                })( node, items_suggestion[i] );\r
@@ -704,7 +720,7 @@ CKEDITOR.plugins.scayt =
                                                        // Register the More suggestions group;\r
                                                        editor.addMenuItem( 'scayt_moresuggest',\r
                                                        {\r
-                                                               label : editor.lang.scayt.moreSuggestions,\r
+                                                               label : lang.moreSuggestions,\r
                                                                group : 'scayt_moresuggest',\r
                                                                order : 10,\r
                                                                getItems : function()\r
@@ -722,7 +738,7 @@ CKEDITOR.plugins.scayt =
                                                                        scayt_control.ignore( node );\r
                                                                }\r
                                                        };\r
-                                                       addButtonCommand( editor, 'ignore', editor.lang.scayt.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1 );\r
+                                                       addButtonCommand( editor, 'ignore', lang.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1 );\r
                                                        mainSuggestions[ 'scayt_ignore' ] = CKEDITOR.TRISTATE_OFF;\r
                                                }\r
 \r
@@ -733,7 +749,7 @@ CKEDITOR.plugins.scayt =
                                                                        scayt_control.ignoreAll( node );\r
                                                                }\r
                                                        };\r
-                                                       addButtonCommand(editor, 'ignore_all', editor.lang.scayt.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2);\r
+                                                       addButtonCommand(editor, 'ignore_all', lang.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2);\r
                                                        mainSuggestions['scayt_ignore_all'] = CKEDITOR.TRISTATE_OFF;\r
                                                }\r
 \r
@@ -744,7 +760,7 @@ CKEDITOR.plugins.scayt =
                                                                        window.scayt.addWordToUserDictionary( node );\r
                                                                }\r
                                                        };\r
-                                                       addButtonCommand(editor, 'add_word', editor.lang.scayt.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3);\r
+                                                       addButtonCommand(editor, 'add_word', lang.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3);\r
                                                        mainSuggestions['scayt_add_word'] = CKEDITOR.TRISTATE_OFF;\r
                                                }\r
 \r
@@ -759,7 +775,7 @@ CKEDITOR.plugins.scayt =
                                {\r
                                        editor.removeListener( 'showScaytState', showInitialState );\r
 \r
-                                       if ( !CKEDITOR.env.opera )\r
+                                       if ( !CKEDITOR.env.opera && !CKEDITOR.env.air )\r
                                                command.setState( plugin.isScaytEnabled( editor ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );\r
                                        else\r
                                                command.setState( CKEDITOR.TRISTATE_DISABLED );\r
@@ -767,7 +783,7 @@ CKEDITOR.plugins.scayt =
 \r
                        editor.on( 'showScaytState', showInitialState );\r
 \r
-                       if ( CKEDITOR.env.opera )\r
+                       if ( CKEDITOR.env.opera || CKEDITOR.env.air )\r
                        {\r
                                editor.on( 'instanceReady', function()\r
                                {\r
@@ -791,7 +807,7 @@ CKEDITOR.plugins.scayt =
                        var elementsPathFilters,\r
                                        scaytFilter = function( element )\r
                                        {\r
-                                               if ( element.hasAttribute( 'scaytid' ) )\r
+                                               if ( element.hasAttribute( 'data-scaytid' ) )\r
                                                        return false;\r
                                        };\r
 \r
@@ -931,15 +947,6 @@ CKEDITOR.plugins.scayt =
  */\r
 \r
 /**\r
- * Makes it possible to place the SCAYT context menu items above others.\r
- * @name CKEDITOR.config.scayt_contextMenuOntop\r
- * @type Boolean\r
- * @default false\r
- * @example\r
- * config.scayt_contextMenuOntop = true;\r
- */\r
-\r
-/**\r
  * Define order of placing of SCAYT context menu items by groups.\r
  * It must be a string with one or more of the following\r
  * words separated by a pipe ("|"):\r