Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CKEDITOR, calling the FullScreen Action outside of the CKEDITOR

Anyone with CKEDitor experience know if it is possible to use JavaScript to call with Full Screen function/action outside of the CKEDITOR?

thanks

like image 685
AnApprentice Avatar asked Jan 14 '10 04:01

AnApprentice


3 Answers

I think it is possible, have you tried the solution here: http://cksource.com/forums/viewtopic.php?f=11&t=14319

It would probably be something like:

var editor = CKEDITOR.instances[instanceName];
editor.execCommand('maximize');
like image 85
Magicgunnar Avatar answered Oct 20 '22 22:10

Magicgunnar


I tested @Magicgunnar but have problems to understand it, and to run (moment to trigg) it (!). This code if more self-explanatory and correct. Tested for 3.5.X:

CKEDITOR.on('instanceReady',
   function( evt ) {
      var instanceName = 'textArea_id'; // the HTML id configured for editor
      var editor = CKEDITOR.instances[instanceName]; 
      editor.execCommand('maximize');
   }
 );
like image 21
Peter Krauss Avatar answered Oct 20 '22 21:10

Peter Krauss


if using the jquery version of ckeditor the below code works perfectly

$(".fullscreen_link").live("click", function () {
        var editor = $('.my_ckeditor').ckeditorGet();
               editor.execCommand('maximize');
    });
like image 2
DaveE Avatar answered Oct 20 '22 23:10

DaveE