Index: _samples/replacebycode.html =================================================================== --- _samples/replacebycode.html (revision 7595) +++ _samples/replacebycode.html (working copy) @@ -60,7 +60,24 @@ // Replace the with an CKEditor // instance, using default configurations. - CKEDITOR.replace( 'editor1' ); + var editor = CKEDITOR.replace( 'editor1', { + toolbar: 'Basic' + }); + + editor.on( 'instanceReady', function(event){ + var myToolbar = 'Basic'; + + event.editor.on( 'beforeMaximize', function(){ + if(event.editor.getCommand( 'maximize' ).state == CKEDITOR.TRISTATE_ON && myToolbar != 'Basic') {//no maximize == baic toolbar + editor.setToolbar('Basic'); + myToolbar = 'Basic'; + }else if(event.editor.getCommand( 'maximize' ).state == CKEDITOR.TRISTATE_OFF && myToolbar != 'Full') {//maximize is on == Full toolbar + editor.setToolbar('Full'); + myToolbar = 'Full'; + } + }); + }); + //]]> @@ -84,7 +101,7 @@
- +