Ticket #2863: 2863_2.patch

File 2863_2.patch, 2.2 KB (added by Artur Formella, 16 years ago)
  • _source/core/config.js

     
    146146         * @example
    147147         * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea';
    148148         */
    149         plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,removeformat,smiley,sourcearea,specialchar,tab,toolbar,wysiwygarea',
     149        plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,print,removeformat,smiley,sourcearea,specialchar,tab,toolbar,wysiwygarea',
    150150
    151151        /**
    152152         * The theme to be used to build the UI.
  • _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                editor.addCommand( pluginName, CKEDITOR.plugins.print );
     18
     19                // Register the toolbar button.
     20                editor.ui.addButton( 'Print',
     21                        {
     22                                label : editor.lang.print,
     23                                command : pluginName
     24                        });
     25        }
     26} );
     27
     28CKEDITOR.plugins.print =
     29{
     30        exec : function( editor )
     31        {
     32                if ( CKEDITOR.env.opera )
     33                        editor.window.$.print();                //Prints the outer page.
     34                else if ( CKEDITOR.env.gecko )
     35                        editor.window.$.print();
     36                else
     37                        editor.document.$.execCommand( "Print" );
     38        }
     39};
  • _source/plugins/toolbar/plugin.js

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