Ticket #5145: 5145_4.patch

File 5145_4.patch, 21.5 KB (added by WebSpellChecker.net, 14 years ago)
  • _source/plugins/scayt/plugin.js

     
    1010
    1111(function()
    1212{
    13         var commandName         = 'scaytcheck',
     13        var commandName         = 'scaytcheck',
    1414                openPage                = '',
    1515                scayt_paused    = null;
    1616
     
    3737                {
    3838                        // Initialise Scayt instance.
    3939                        var oParams = {};
    40                         oParams.srcNodeRef = editor.document.getWindow().$.frameElement;                // Get the iframe.
     40                        // Get the iframe.
     41                        oParams.srcNodeRef = editor.document.getWindow().$.frameElement;
    4142                        // syntax : AppName.AppVersion@AppRevision
    4243                        oParams.assocApp  = "CKEDITOR." + CKEDITOR.version + "@" + CKEDITOR.revision;
    4344                        oParams.customerid = editor.config.scayt_customerid  || "1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2";
    44                         oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds;
    45                         oParams.userDictionaryName = editor.config.scayt_userDictionaryName;
     45                        oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds || '';
     46                        oParams.userDictionaryName = editor.config.scayt_userDictionaryName || '';
    4647                        oParams.sLang = editor.config.scayt_sLang || "en_US";
    4748
    48                         if ( CKEDITOR._scaytParams )
     49                        if ( CKEDITOR._.scaytParams )
    4950                        {
    50                                 for ( var k in CKEDITOR._scaytParams )
     51                                for ( var k in CKEDITOR._.scaytParams )
    5152                                {
    52                                         oParams[ k ] = CKEDITOR._scaytParams[ k ];
     53                                        oParams[ k ] = CKEDITOR._.scaytParams[ k ];
    5354                                }
    5455                        }
    5556
     
    7273                        var fTabs  = [];
    7374
    7475                        for (var i = 0,l=4; i<l; i++)
     76                        {
    7577                                fTabs.push( uiTabs[i] && plugin.uiTabs[i] );
    76 
     78                        }
    7779                        plugin.uiTabs = fTabs;
     80                       
    7881                        try {
    7982                                scayt_control.setDisabled( scayt_paused === false );
    8083                        } catch (e) {}
    81 
     84                       
    8285                        editor.fire( 'showScaytState' );
    8386                };
    8487
    8588                editor.on( 'contentDom', createInstance );
    8689                editor.on( 'contentDomUnload', function()
     90                {
     91                        // Remove scripts.
     92                        var scripts = CKEDITOR.document.getElementsByTag( 'script' ),
     93                                scaytIdRegex =  /^dojoIoScript(\d+)$/i,
     94                                scaytSrcRegex =  /^https?:\/\/svc\.spellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;
     95
     96                        for ( var i=0; i < scripts.count(); i++ )
    8797                        {
    88                                 // Remove scripts.
    89                                 var scripts = CKEDITOR.document.getElementsByTag( 'script' ),
    90                                         scaytIdRegex =  /^dojoIoScript(\d+)$/i,
    91                                         scaytSrcRegex =  /^https?:\/\/svc\.spellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;
     98                                var script = scripts.getItem( i ),
     99                                        id = script.getId(),
     100                                        src = script.getAttribute( 'src' );
    92101
    93                                 for ( var i=0; i < scripts.count(); i++ )
    94                                 {
    95                                         var script = scripts.getItem( i ),
    96                                                 id = script.getId(),
    97                                                 src = script.getAttribute( 'src' );
     102                                if ( id && src && id.match( scaytIdRegex ) && src.match( scaytSrcRegex ))
     103                                        script.remove();
     104                        }
     105                });
    98106
    99                                         if ( id && src && id.match( scaytIdRegex ) && src.match( scaytSrcRegex ))
    100                                                 script.remove();
    101                                 }
    102                         });
    103 
    104107                editor.on( 'beforeCommandExec', function( ev )          // Disable SCAYT before Source command execution.
    105108                        {
     109                                if ( ev.data.name == 'removeFormat' && editor.mode == 'wysiwyg' )
     110                                {
     111                                       
     112                                        if ( plugin.isScaytEnabled( editor ) )
     113                                                window.setTimeout(function(){plugin.getScayt(editor).refresh()},10);
     114                                       
     115                                }
    106116                                if ( (ev.data.name == 'source' ||  ev.data.name == 'newpage') && editor.mode == 'wysiwyg' )
    107117                                {
    108118                                        var scayt_instanse = plugin.getScayt( editor );
    109119                                        if ( scayt_instanse )
    110120                                        {
    111121                                                scayt_paused = scayt_instanse.paused = !scayt_instanse.disabled;
    112                                                 scayt_instanse.destroy();
    113                                                 delete plugin.instances[ editor.name ];
     122                                                scayt_instanse.destroy( true );
     123                                                delete plugin.instances[editor.name];
    114124                                        }
    115125                                }
    116126                        });
    117127
    118128
    119129                editor.on( 'destroy', function()
    120                         {
    121                                 plugin.getScayt( editor ).destroy();
    122                         });
     130                {
     131                        plugin.getScayt( editor ).destroy( true );
     132                });
    123133                // Listen to data manipulation to reflect scayt markup.
    124134                editor.on( 'afterSetData', function()
     135                {
     136                        if ( plugin.isScaytEnabled( editor ) )
    125137                        {
    126                                 if ( plugin.isScaytEnabled( editor ) )
    127                                         plugin.getScayt( editor ).refresh();
    128                         });
     138                                plugin.getScayt( editor ).refresh();
    129139
     140                                if( !editor.checkDirty() )
     141                                        setTimeout( function(){ editor.resetDirty(); } );
     142                        }
     143                });
     144
    130145                // Reload spell-checking for current word after insertion completed.
    131146                editor.on( 'insertElement', function()
     147                {
     148                        var scayt_instance = plugin.getScayt( editor );
     149                        if ( plugin.isScaytEnabled( editor ) )
    132150                        {
    133                                 var scayt_instance = plugin.getScayt( editor );
    134                                 if ( plugin.isScaytEnabled( editor ) )
    135                                 {
    136                                         // Unlock the selection before reload, SCAYT will take
    137                                         // care selection update.
    138                                         if ( CKEDITOR.env.ie )
    139                                                 editor.getSelection().unlock( true );
     151                                // Unlock the selection before reload, SCAYT will take
     152                                // care selection update.
     153                                if ( CKEDITOR.env.ie )
     154                                        editor.getSelection().unlock( true );
    140155
    141                                         // Swallow any SCAYT engine errors.
    142                                         try{
    143                                                 scayt_instance.refresh();
    144                                         }catch( er )
    145                                         {}
    146                                 }
    147                         }, this, null, 50 );
     156                                // Swallow any SCAYT engine errors.
     157                                try{
     158                                        scayt_instance.refresh();
     159                                }catch( er )
     160                                {}
     161                        }
     162                }, this, null, 50 );
    148163
    149164                editor.on( 'insertHtml', function()
     165                {
     166
     167                        var scayt_instance = plugin.getScayt( editor );
     168                        if ( plugin.isScaytEnabled( editor ) )
    150169                        {
     170                                // Unlock the selection before reload, SCAYT will take
     171                                // care selection update.
     172                                if ( CKEDITOR.env.ie )
     173                                        editor.getSelection().unlock( true );
    151174
    152                                 var scayt_instance = plugin.getScayt( editor );
    153                                 if ( plugin.isScaytEnabled( editor ) )
    154                                 {
    155                                         // Unlock the selection before reload, SCAYT will take
    156                                         // care selection update.
    157                                         if ( CKEDITOR.env.ie )
    158                                                 editor.getSelection().unlock( true );
     175                                // Swallow any SCAYT engine errors.
     176                                try{
     177                                        scayt_instance.refresh();
     178                                }catch( er )
     179                                {}
     180                        }
     181                }, this, null, 50 );
    159182
    160                                         // Swallow any SCAYT engine errors.
    161                                         try{
    162                                                 scayt_instance.refresh();
    163                                         }catch( er )
    164                                         {}
    165                                 }
    166                         }, this, null, 50 );
    167 
    168183                editor.on( 'scaytDialog', function( ev )        // Communication with dialog.
    169                         {
    170                                 ev.data.djConfig = window.djConfig;
    171                                 ev.data.scayt_control = plugin.getScayt( editor );
    172                                 ev.data.tab = openPage;
    173                                 ev.data.scayt = window.scayt;
    174                         });
     184                {
     185                        ev.data.djConfig = window.djConfig;
     186                        ev.data.scayt_control = plugin.getScayt( editor );
     187                        ev.data.tab = openPage;
     188                        ev.data.scayt = window.scayt;
     189                });
    175190
    176191                var dataProcessor = editor.dataProcessor,
    177192                        htmlFilter = dataProcessor && dataProcessor.htmlFilter;
     
    218233                },
    219234                loadEngine : function( editor )
    220235                {
     236                        if ( CKEDITOR.env.opera )
     237                                return;
    221238                        if ( this.engineLoaded === true )
    222239                                return onEngineLoad.apply( editor );    // Add new instance.
    223240                        else if ( this.engineLoaded == -1 )                     // We are waiting.
     
    230247                                },
    231248                                this,
    232249                                null,
    233                                 0 );    // First to run.
     250                                0
     251                        );      // First to run.
    234252
    235253                        this.engineLoaded = -1; // Loading in progress.
    236254
     
    238256                        var protocol = document.location.protocol;
    239257                        // Default to 'http' for unknown.
    240258                        protocol = protocol.search( /https?:/) != -1? protocol : 'http:';
    241                         var baseUrl  = "svc.spellchecker.net/spellcheck3/lf/scayt/scayt21.js";
     259                        var baseUrl  = "svc.spellchecker.net/spellcheck31/lf/scayt/scayt22.js";
    242260
    243261                        var scaytUrl  =  editor.config.scayt_srcUrl || ( protocol + "//" + baseUrl );
    244262                        var scaytConfigBaseUrl =  plugin.parseUrl( scaytUrl ).path +  "/";
     
    355373                        // string tp array convert
    356374                        confuiTabs = confuiTabs.split(",");
    357375                        // check array length ! allwaays must be 3 filled with 1 or 0
    358                         for (var i=0,l=3; i<l; i++){
     376                        for (var i=0,l=3; i<l; i++)
     377                        {
    359378                                var flag = parseInt(confuiTabs[i] || "1" ,10);
    360379                                uiTabs.push(  flag  );
    361380                        }
     
    367386
    368387                        // allways added
    369388                        uiMuneItems.scaytToggle =
    370                                 {
    371                                         label : editor.lang.scayt.enable,
    372                                         command : commandName,
    373                                         group : menuGroup
    374                                 };
     389                        {
     390                                label : editor.lang.scayt.enable,
     391                                command : commandName,
     392                                group : menuGroup
     393                        };
    375394
    376395                        if (uiTabs[0] == 1)
    377396                                uiMuneItems.scaytOptions =
     
    457476                        // If the "contextmenu" plugin is loaded, register the listeners.
    458477                        if ( editor.contextMenu && editor.addMenuItems )
    459478                        {
    460                                 editor.contextMenu.addListener( function( element )
     479                                editor.contextMenu.addListener( function()
     480                                {
     481                                       
     482                                        if ( !plugin.isScaytEnabled( editor ) )
     483                                        {                                                       
     484                                                return null;
     485                                        }
     486                                        var scayt_control = plugin.getScayt( editor );
     487                                        var node = scayt_control.getScaytNode();
     488
     489                                        if ( !node )
     490                                                return null;
     491
     492                                        word = scayt_control.getWord( node );
     493
     494                                        if ( !word )
    461495                                        {
    462                                                 if ( !( plugin.isScaytEnabled( editor ) && element ) )
    463                                                         return null;
     496                                                return null;
     497                                        }                                               
     498                                        var sLang = scayt_control.getLang(),
     499                                                _r = {},
     500                                                items_suggestion = window.scayt.getSuggestion( word, sLang );
     501                                        if (!items_suggestion || !items_suggestion.length)
     502                                        {                                                       
     503                                                return null;
     504                                        }
     505                                        // Remove unused commands and menuitems
     506                                        for ( i in moreSuggestions )
     507                                        {
     508                                                delete editor._.menuItems[ i ];
     509                                                delete editor._.commands[ i ];
     510                                        }
     511                                        for ( i in mainSuggestions )
     512                                        {
     513                                                delete editor._.menuItems[ i ];
     514                                                delete editor._.commands[ i ];
     515                                        }
     516                                        moreSuggestions = {};           // Reset items.
     517                                        mainSuggestions = {};
    464518
    465                                                 var scayt_control = plugin.getScayt( editor ),
    466                                                         word = scayt_control.getWord( element.$ );
     519                                        var moreSuggestionsUnable = editor.config.scayt_moreSuggestions || "on";
     520                                        var moreSuggestionsUnableAdded = false;
    467521
    468                                                 if ( !word )
    469                                                         return null;
     522                                        var maxSuggestions = editor.config.scayt_maxSuggestions;
     523                                        ( typeof maxSuggestions != 'number' ) && ( maxSuggestions = 5 );
     524                                        !maxSuggestions && ( maxSuggestions = items_suggestion.length );
    470525
    471                                                 var sLang = scayt_control.getLang(),
    472                                                         _r = {},
    473                                                         items_suggestion = window.scayt.getSuggestion( word, sLang );
    474                                                 if (!items_suggestion || !items_suggestion.length )
    475                                                         return null;
    476                                                 // Remove unused commands and menuitems
    477                                                 for ( i in moreSuggestions )
     526                                        var contextCommands = editor.config.scayt_contextCommands || "all";
     527                                        contextCommands = contextCommands.split("|");
     528
     529                                        for ( var i = 0, l = items_suggestion.length; i < l; i += 1 )
     530                                        {
     531                                                var commandName = 'scayt_suggestion_' + items_suggestion[i].replace( ' ', '_' );
     532                                                var exec = ( function( el, s )
     533                                                        {
     534                                                                return {
     535                                                                        exec: function()
     536                                                                        {
     537                                                                                scayt_control.replace(el, s);
     538                                                                        }
     539                                                                };
     540                                                        })( node, items_suggestion[i] );
     541
     542                                                if ( i < maxSuggestions )
    478543                                                {
    479                                                         delete editor._.menuItems[ i ];
    480                                                         delete editor._.commands[ i ];
     544                                                        addButtonCommand( editor, 'button_' + commandName, items_suggestion[i],
     545                                                                commandName, exec, 'scayt_suggest', i + 1 );
     546                                                        _r[ commandName ] = CKEDITOR.TRISTATE_OFF;
     547                                                        mainSuggestions[ commandName ] = CKEDITOR.TRISTATE_OFF;
    481548                                                }
    482                                                 for ( i in mainSuggestions )
     549                                                else if ( moreSuggestionsUnable == "on" )
    483550                                                {
    484                                                         delete editor._.menuItems[ i ];
    485                                                         delete editor._.commands[ i ];
     551                                                        addButtonCommand( editor, 'button_' + commandName, items_suggestion[i],
     552                                                                commandName, exec, 'scayt_moresuggest', i + 1 );
     553                                                        moreSuggestions[ commandName ] = CKEDITOR.TRISTATE_OFF;
     554                                                        moreSuggestionsUnableAdded = true;
    486555                                                }
    487                                                 moreSuggestions = {};           // Reset items.
    488                                                 mainSuggestions = {};
     556                                        }
    489557
    490                                                 var moreSuggestionsUnable = editor.config.scayt_moreSuggestions || "on";
    491                                                 var moreSuggestionsUnableAdded = false;
    492 
    493                                                 var maxSuggestions = editor.config.scayt_maxSuggestions;
    494                                                 ( typeof maxSuggestions != 'number' ) && ( maxSuggestions = 5 );
    495                                                 !maxSuggestions && ( maxSuggestions = items_suggestion.length );
    496 
    497                                                 var contextCommands = editor.config.scayt_contextCommands || "all";
    498                                                 contextCommands = contextCommands.split("|");
    499 
    500                                                 for ( var i = 0, l = items_suggestion.length; i < l; i += 1 )
     558                                        if ( moreSuggestionsUnableAdded ){
     559                                                // Rgister the More suggestions group;
     560                                                editor.addMenuItem( 'scayt_moresuggest',
    501561                                                {
    502                                                         var commandName = 'scayt_suggestion_' + items_suggestion[i].replace( ' ', '_' );
    503                                                         var exec = ( function( el, s )
    504                                                                 {
    505                                                                         return {
    506                                                                                 exec: function()
    507                                                                                 {
    508                                                                                         scayt_control.replace(el, s);
    509                                                                                 }
    510                                                                         };
    511                                                                 })( element.$, items_suggestion[i] );
    512 
    513                                                         if ( i < maxSuggestions )
     562                                                        label : editor.lang.scayt.moreSuggestions,
     563                                                        group : 'scayt_moresuggest',
     564                                                        order : 10,
     565                                                        getItems : function()
    514566                                                        {
    515                                                                 addButtonCommand( editor, 'button_' + commandName, items_suggestion[i],
    516                                                                         commandName, exec, 'scayt_suggest', i + 1 );
    517                                                                 _r[ commandName ] = CKEDITOR.TRISTATE_OFF;
    518                                                                 mainSuggestions[ commandName ] = CKEDITOR.TRISTATE_OFF;
     567                                                                return moreSuggestions;
    519568                                                        }
    520                                                         else if ( moreSuggestionsUnable == "on" )
    521                                                         {
    522                                                                 addButtonCommand( editor, 'button_' + commandName, items_suggestion[i],
    523                                                                         commandName, exec, 'scayt_moresuggest', i + 1 );
    524                                                                 moreSuggestions[ commandName ] = CKEDITOR.TRISTATE_OFF;
    525                                                                 moreSuggestionsUnableAdded = true;
    526                                                         }
    527                                                 }
     569                                                });
     570                                                mainSuggestions[ 'scayt_moresuggest' ] = CKEDITOR.TRISTATE_OFF;
    528571
    529                                                 if ( moreSuggestionsUnableAdded ){
    530                                                         // Rgister the More suggestions group;
    531                                                         editor.addMenuItem( 'scayt_moresuggest',
    532                                                         {
    533                                                                 label : editor.lang.scayt.moreSuggestions,
    534                                                                 group : 'scayt_moresuggest',
    535                                                                 order : 10,
    536                                                                 getItems : function()
    537                                                                 {
    538                                                                         return moreSuggestions;
    539                                                                 }
    540                                                         });
    541                                                         mainSuggestions[ 'scayt_moresuggest' ] = CKEDITOR.TRISTATE_OFF;
     572                                        }
    542573
    543                                                 }
     574                                        if ( in_array( "all",contextCommands )  || in_array("ignore",contextCommands)  )
     575                                        {
     576                                                var ignore_command = {
     577                                                        exec: function(){
     578                                                                scayt_control.ignore( node );
     579                                                        }
     580                                                };
     581                                                addButtonCommand(editor, 'ignore', editor.lang.scayt.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1);
     582                                                mainSuggestions['scayt_ignore'] = CKEDITOR.TRISTATE_OFF;
     583                                        }
    544584
    545                                                 if ( in_array( "all",contextCommands )  || in_array("ignore",contextCommands)  )
    546                                                 {
    547                                                         var ignore_command = {
    548                                                                 exec: function(){
    549                                                                         scayt_control.ignore(element.$);
    550                                                                 }
    551                                                         };
    552                                                         addButtonCommand(editor, 'ignore', editor.lang.scayt.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1);
    553                                                         mainSuggestions['scayt_ignore'] = CKEDITOR.TRISTATE_OFF;
    554                                                 }
     585                                        if ( in_array( "all",contextCommands )  || in_array("ignoreall",contextCommands)  )
     586                                        {
     587                                                var ignore_all_command = {
     588                                                        exec: function(){
     589                                                                scayt_control.ignoreAll( node );
     590                                                        }
     591                                                };
     592                                                addButtonCommand(editor, 'ignore_all', editor.lang.scayt.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2);
     593                                                mainSuggestions['scayt_ignore_all'] = CKEDITOR.TRISTATE_OFF;
     594                                        }
    555595
    556                                                 if ( in_array( "all",contextCommands )  || in_array("ignoreall",contextCommands)  )
    557                                                 {
    558                                                         var ignore_all_command = {
    559                                                                 exec: function(){
    560                                                                         scayt_control.ignoreAll(element.$);
    561                                                                 }
    562                                                         };
    563                                                         addButtonCommand(editor, 'ignore_all', editor.lang.scayt.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2);
    564                                                         mainSuggestions['scayt_ignore_all'] = CKEDITOR.TRISTATE_OFF;
    565                                                 }
     596                                        if ( in_array( "all",contextCommands )  || in_array("add",contextCommands)  )
     597                                        {
     598                                                var addword_command = {
     599                                                        exec: function(){
     600                                                                window.scayt.addWordToUserDictionary( node );
     601                                                        }
     602                                                };
     603                                                addButtonCommand(editor, 'add_word', editor.lang.scayt.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3);
     604                                                mainSuggestions['scayt_add_word'] = CKEDITOR.TRISTATE_OFF;
     605                                        }
    566606
    567                                                 if ( in_array( "all",contextCommands )  || in_array("add",contextCommands)  )
    568                                                 {
    569                                                         var addword_command = {
    570                                                                 exec: function(){
    571                                                                         window.scayt.addWordToUserDictionary(element.$);
    572                                                                 }
    573                                                         };
    574                                                         addButtonCommand(editor, 'add_word', editor.lang.scayt.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3);
    575                                                         mainSuggestions['scayt_add_word'] = CKEDITOR.TRISTATE_OFF;
    576                                                 }
     607                                        if ( scayt_control.fireOnContextMenu )
     608                                                scayt_control.fireOnContextMenu( editor );
    577609
    578                                                 if ( scayt_control.fireOnContextMenu )
    579                                                         scayt_control.fireOnContextMenu( editor );
    580 
    581                                                 return mainSuggestions;
    582                                         });
     610                                        return mainSuggestions;
     611                                });
    583612                        }
    584613
    585614                        // Start plugin
     
    591620                                        command.setState( plugin.isScaytEnabled( editor ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
    592621                                };
    593622                                editor.on( 'showScaytState', showInitialState );
    594 
    595623                                plugin.loadEngine( editor );
    596624                        }
    597625                }
    598626        });
    599627})();
    600628
    601 // TODO: Documentation
    602 // CKEDITOR.config.scayt_maxSuggestions
    603 // CKEDITOR.config.scayt_autoStartup
     629/**
     630 * If enabled (true), turns on SCAYT automatically after loading the editor.
     631 * @name CKEDITOR.config.scayt_autoStartup
     632 * @type Boolean
     633 * @default false
     634 * @example
     635 * config.scayt_autoStartup = true;
     636 */
     637
     638/**
     639 * Defines the number of SCAYT suggestions to show in the main context menu.
     640 * The possible values are:
     641 * <ul>
     642 *      <li>0 (zero): All suggestions are displayed in the main context menu.</li>
     643 *      <li>Positive number: The maximum number of suggestions to shown in context
     644 *              menu. Other entries will be shown in "More Suggestions" sub-menu.</li>
     645 *      <li>Negative number: No suggestions are shown in the main context menu. All
     646 *              entries will be listed in the "Suggestions" sub-menu.</li>
     647 * </ul>
     648 * @name CKEDITOR.config.scayt_maxSuggestions
     649 * @type Number
     650 * @default 5
     651 * @example
     652 * // Display only three suggestions in the main context menu.
     653 * config.scayt_maxSuggestions = 3;
     654 * @example
     655 * // Do not show the suggestions directly.
     656 * config.scayt_maxSuggestions = -1;
     657 */
     658
     659/**
     660 * Sets the customer ID for SCAYT. Required for migration from free version
     661 * with banner to paid version.
     662 * @name CKEDITOR.config.scayt_customerid
     663 * @type String
     664 * @default ''
     665 * @example
     666 * // Load SCAYT using my customer ID.
     667 * config.scayt_customerid  = 'your-encrypted-customer-id';
     668 */
     669
     670/**
     671 * Enables/disables the "More Suggestions" sub-menu in the context menu.
     672 * The possible values are "on" or "off".
     673 * @name CKEDITOR.config.scayt_moreSuggestions
     674 * @type String
     675 * @default 'on'
     676 * @example
     677 * // Disables the "More Suggestions" sub-menu.
     678 * config.scayt_moreSuggestions = 'off';
     679 */
     680
     681/**
     682 * Customizes the display of SCAYT context menu commands ("Add Word", "Ignore"
     683 * and "Ignore All"). It must be a string with one or more of the following
     684 * words separated by a pipe ("|"):
     685 * <ul>
     686 *      <li>"off": disables all options.</li>
     687 *      <li>"all": enables all options.</li>
     688 *      <li>"ignore": enables the "Ignore" option.</li>
     689 *      <li>"ignoreall": enables the "Ignore All" option.</li>
     690 *      <li>"add": enables the "Add Word" option.</li>
     691 * </ul>
     692 * @name CKEDITOR.config.scayt_contextCommands
     693 * @type String
     694 * @default 'all'
     695 * @example
     696 * // Show only "Add Word" and "Ignore All" in the context menu.
     697 * config.scayt_contextCommands = 'add|ignoreall';
     698 */
     699
     700/**
     701 * Sets the default spellchecking language for SCAYT.
     702 * @name CKEDITOR.config.scayt_sLang
     703 * @type String
     704 * @default 'en_US'
     705 * @example
     706 * // Sets SCAYT to German.
     707 * config.scayt_sLang = 'de_DE';
     708 */
     709
     710/**
     711 * Sets the visibility of the SCAYT tabs in the settings dialog and toolbar
     712 * button. The value must contain a "1" (enabled) or "0" (disabled) number for
     713 * each of the following entries, in this precise order, separated by a
     714 * comma (","): "Options", "Languages" and "Dictionary".
     715 * @name CKEDITOR.config.scayt_uiTabs
     716 * @type String
     717 * @default '1,1,1'
     718 * @example
     719 * // Hide the "Languages" tab.
     720 * config.scayt_uiTabs = '1,0,1';
     721 */
     722
     723
     724/**
     725 * Set the URL to SCAYT core. Required to switch to licensed version of SCAYT application.
     726 * Further details at http://wiki.spellchecker.net/doku.php?id=3rd:wysiwyg:fckeditor:wscckf3l .
     727 * @name CKEDITOR.config.scayt_srcUrl
     728 * @type String
     729 * @default ''
     730 * @example
     731 * CKEDITOR.config.scayt_srcUrl = "http://my-host/spellcheck/lf/scayt/scayt.js";
     732 */
     733
     734/**
     735 * Links SCAYT to custom dictionaries. It's a string containing dictionary ids
     736 * separared by commas (","). Available only for licensed version.
     737 * Further details at http://wiki.spellchecker.net/doku.php?id=custom_dictionary_support .
     738 * @name CKEDITOR.config.scayt_customDictionaryIds
     739 * @type String
     740 * @default ''
     741 * @example
     742 * config.scayt_customDictionaryIds = '3021,3456,3478"';
     743 */
     744
     745/**
     746 * Makes it possible to activate a custom dictionary on SCAYT. The user
     747 * dictionary name must be used. Available only for licensed version.
     748 * @name CKEDITOR.config.scayt_userDictionaryName
     749 * @type String
     750 * @default ''
     751 * @example
     752 * config.scayt_userDictionaryName = 'MyDictionary';
     753 */
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy