Ticket #6602: ckedit_iphone.diff

File ckedit_iphone.diff, 2.1 KB (added by David Wipperfurth, 13 years ago)

diff on ckeditor trunk to add smooth compatibility degradation

  • _source/core/ckeditor_basic.js

     
    8282
    8383                var createInstance = function( elementOrIdOrName, config, creationFunction, data )
    8484                {
    85                         if ( CKEDITOR.env.isCompatible )
     85                        if ( !CKEDITOR.env.isTextCompatible ) return null;
     86                        if ( !CKEDITOR.env.isCompatible )
    8687                        {
    87                                 // Load the full core.
    88                                 if ( CKEDITOR.loadFullCore )
    89                                         CKEDITOR.loadFullCore();
    90 
    91                                 var editor = creationFunction( elementOrIdOrName, config, data );
    92                                 CKEDITOR.add( editor );
    93                                 return editor;
     88                                config.plugins = 'button,enterkey,maximize,'
     89                                                           + 'preview,print,resize,save,sourcearea';
     90                                config.startupMode = 'source';
    9491                        }
    9592
    96                         return null;
     93                        // Load the full core.
     94                        if ( CKEDITOR.loadFullCore )
     95                                CKEDITOR.loadFullCore();
     96
     97                        var editor = creationFunction( elementOrIdOrName, config, data );
     98                        if(!editor) return null;
     99                       
     100                        CKEDITOR.add( editor );
     101
     102                        return editor;
    97103                };
    98104
    99105                /**
  • _source/core/env.js

     
    227227                        ( env.air && version >= 1 ) ||
    228228                        ( env.webkit && version >= 522 ) ||
    229229                        false );
    230 
     230       
    231231                /**
     232                 * Indicates that CKEditor is running on a browser capable of text
     233                 * editing but not necessarily capable of WYSIWYG editing.
     234                 * @name CKEDITOR.env.isTextCompatible
     235                 * @type Boolean
     236                 * @example
     237                 * if ( CKEDITOR.env.isTextCompatible )
     238                 *     alert( "Your browser support text editing..." );
     239                 */
     240                env.isTextCompatible = (
     241                        ( env.ie && version >= 5.5 ) ||
     242                        ( env.gecko && version >= 10500 ) ||
     243                        ( env.opera && version >= 9.2 ) ||
     244                        ( env.air && version >= 1 ) ||
     245                        ( env.webkit && version >= 419.3 ) ||
     246                        false
     247                );
     248               
     249                /**
    232250                 * The CSS class to be appended on the main UI containers, making it
    233251                 * easy to apply browser specific styles to it.
    234252                 * @name CKEDITOR.env.cssClass
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy