JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5
[ckeditor.git] / _source / plugins / scayt / plugin.js
index 653c755..0f3f339 100644 (file)
@@ -244,7 +244,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
@@ -357,8 +358,8 @@ CKEDITOR.plugins.scayt =
                },\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 +383,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
@@ -594,6 +595,7 @@ CKEDITOR.plugins.scayt =
                                                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
@@ -756,7 +758,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
@@ -764,7 +766,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
@@ -788,7 +790,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