Is there a way to programmatically select the style. I tried doing some html inspecting in firefox and found the below javascript call is made when a user selects a style from the styles drop down.
I tried using the same call but had no luck (based on the callFunction documentation I also think the 9 is session specific).
Is there a standard way to do this?
CKEDITOR.tools.callFunction(9,'Scene Heading');
I tried using the same call but had no luck (based on the callFunction documentation I also think the 9 is session specific).
Is there a standard way to do this?

I'm sure my answer is too
I'm sure my answer is too late, but for others wanting to do this I eventually found a way, after looking at the styles, stylescombo and path plugins.
I have no idea whether this is a good way of doing it or not, but it seems to work.
var styles = {}, stylesPopulated = false; e.editor.on('selectionChange',function(ev) { // Collect together the styles in an object, where the name is the // name of the object and the content includes functions for // working with styles. Adapted from the elements path plugin. // Styles only need to be collected once, so check to see if the // object has been populated first. for(var item in styles){stylesPopulated=true;break;} if(!stylesPopulated) { // Put all styles into an array. for ( var i = 0, count = ev.editor._.stylesDefinitions.length ; i < count ; i++ ) { var styleDefinition = ev.editor._.stylesDefinitions[ i ]; styles[styleDefinition.name] = new CKEDITOR.style(styleDefinition); } } // end making list of styles // Apply the style you want. styles['name of my style']['apply'](e.editor.document); }); // end e.editor.on('selectionChange')