Can anyone please give me an example of using styleCommand? I used the following codes but they didn't work because of null object error in ckeditor.js.
var styleCommand = CKEDITOR.config.fontSize_style;
var style = new CKEDITOR.style(styleDefinition, {size: newValue}};
var styleCommand = new CKEDITOR.styleCommand(style);
styleCommand.exec(editor);
Thank you.
Kristin
var styleCommand = CKEDITOR.config.fontSize_style;
var style = new CKEDITOR.style(styleDefinition, {size: newValue}};
var styleCommand = new CKEDITOR.styleCommand(style);
styleCommand.exec(editor);
Thank you.
Kristin

Re: How to execute styleCommand
Re: How to execute styleCommand
Re: How to execute styleCommand
CKEDITOR.plugins.add( 'fly', { requires : [ 'styles', 'button' ], init : function( editor ) { var style = new CKEDITOR.style( {element:'marquee', styles:{width:'300px'}, attributes:{direction:'left', behavior:'alternate'}} ); editor.attachStyleStateChange( style, function( state ) { editor.getCommand( 'fly' ).setState( state ); }); editor.addCommand( 'fly', new CKEDITOR.styleCommand( style ) ); editor.ui.addButton( 'Fly', { label : 'fly text', command : 'fly' }); } });this plugin to make some text to be fly text.
edit config file to load 'fly' plugin,and add toolbar button "Fly".
Click Fly button, you can make the text you select to fly on non-editable mode.