Ticket #2863: 2863_3.patch

File 2863_3.patch, 2.8 KB (added by Artur Formella, 15 years ago)
  • _source/core/config.js

     
    147147         * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea';
    148148         */
    149149
    150         plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,preview,removeformat,smiley,indent,link,list,sourcearea,table,specialchar,tab,toolbar,wysiwygarea',
     150        plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,preview,print,removeformat,smiley,indent,link,list,sourcearea,table,specialchar,tab,toolbar,wysiwygarea',
    151151
    152152        /**
    153153         * The theme to be used to build the UI.
  • _source/core/editor.js

     
    346346                 */
    347347                addCommand : function( commandName, commandDefinition )
    348348                {
    349                         this._.commands[ commandName ] = new CKEDITOR.command( this, commandDefinition );
     349                        return this._.commands[ commandName ] = new CKEDITOR.command( this, commandDefinition );
    350350                },
    351351
    352352                addCss : function( css )
  • _source/plugins/print/plugin.js

     
     1/*
     2Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
     3For licensing, see LICENSE.html or http://ckeditor.com/license
     4*/
     5
     6/**
     7 * @file Print Plugin
     8 */
     9
     10CKEDITOR.plugins.add( 'print',
     11{
     12        init : function( editor )
     13        {
     14                var pluginName = 'print';
     15
     16                // Register the command.
     17                var command = editor.addCommand( pluginName, CKEDITOR.plugins.print );
     18
     19                // It is imposible to print the inner document in Opera.
     20                if ( CKEDITOR.env.opera )
     21                        command.state = CKEDITOR.TRISTATE_DISABLED;
     22
     23                // Register the toolbar button.
     24                editor.ui.addButton( 'Print',
     25                        {
     26                                label : editor.lang.print,
     27                                command : pluginName
     28                        });
     29        }
     30} );
     31
     32CKEDITOR.plugins.print =
     33{
     34        exec : function( editor )
     35        {
     36                if ( CKEDITOR.env.opera )
     37                        return;
     38                else if ( CKEDITOR.env.gecko )
     39                        editor.window.$.print();
     40                else
     41                        editor.document.$.execCommand( "Print" );
     42        }
     43};
  • _source/plugins/toolbar/plugin.js

     
    207207[
    208208        [
    209209                'Source', '-',
    210                 'NewPage', 'Preview', '-',
     210                'NewPage', 'Preview', 'Print', '-',
    211211                'Bold', 'Italic', 'Underline', 'Strike', '-',
    212212                'NumberedList', 'BulletedList', '-',
    213213                'Outdent', 'Indent', '-',
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy