CKEditor 4 Documentation

CKEDITOR.styleCommand

Files

Generic style command. It applies a specific style when executed.

var boldStyle = new CKEDITOR.style( { element: 'strong' } );
// Register the "bold" command, which applies the bold style.
editor.addCommand( 'bold', new CKEDITOR.styleCommand( boldStyle ) );
Defined By

Methods

CKEDITOR.styleCommand
view source
new( style, [ext] ) : CKEDITOR.styleCommand
Creates a styleCommand class instance. ...

Creates a styleCommand class instance.

Parameters

  • style : CKEDITOR.style

    The style to be applied when command is executed.

  • ext : Object (optional)

    Additional command definition's properties.

Returns

CKEDITOR.styleCommand
view source
( editor )
...

Parameters