public/ckeditor/4.4dev/core/style.js
function( editor ) {
			// Backward compatibility.
			if ( editor instanceof CKEDITOR.dom.document )
				return applyStyleOnSelection.call( this, editor.getSelection() );

			if ( this.checkApplicable( editor.elementPath(), editor ) ) {
				var initialEnterMode = this._.enterMode;

				// See comment in removeStyle.
				if ( !initialEnterMode )
					this._.enterMode = editor.activeEnterMode;
				applyStyleOnSelection.call( this, editor.getSelection(), 0, editor );
				this._.enterMode = initialEnterMode;
			}
		}
function( editor ) {
			// Backward compatibility.
			if ( editor instanceof CKEDITOR.dom.document )
				return applyStyleOnSelection.call( this, editor.getSelection() );

			if ( this.checkApplicable( editor.elementPath(), editor ) ) {
				var initialEnterMode = this._.enterMode;

				// See comment in removeStyle.
				if ( !initialEnterMode )
					this._.enterMode = editor.activeEnterMode;
				applyStyleOnSelection.call( this, editor.getSelection(), 0, editor );
				this._.enterMode = initialEnterMode;
			}
		}
function ( editor ) { // Backward compatibility. if ( editor instanceof CKEDITOR . dom . document ) return applyStyleOnSelection . call ( this , editor . getSelection ( ) ) ; if ( this . checkApplicable ( editor . elementPath ( ) , editor ) ) { var initialEnterMode = this . _ . enterMode ; // See comment in removeStyle. if ( ! initialEnterMode ) this . _ . enterMode = editor . activeEnterMode ; applyStyleOnSelection . call ( this , editor . getSelection ( ) , 0 , editor ) ; this . _ . enterMode = initialEnterMode ; } }
Applies the style on the editor's current selection.

Before the style is applied, the method checks if the {@link #checkApplicable style is applicable}.

**Note:** The recommended way of applying the style is by using the
{@link CKEDITOR.editor#applyStyle} method, which is a shorthand for this method.

@param {CKEDITOR.editor/CKEDITOR.dom.document} editor The editor instance in which
the style will be applied.
A {@link CKEDITOR.dom.document} instance is accepted for backward compatibility
reasons, although since CKEditor 4.4 this type of argument is deprecated. Read more about
the signature change in the {@link CKEDITOR.style} documentation.
Applies the style on the editor s current selection .