CKEDITOR, calling the FullScreen Action outside of the CKEDITOR

白昼怎懂夜的黑 提交于 2019-12-12 11:00:23

问题


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

thanks


回答1:


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');



回答2:


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');
   }
 );



回答3:


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');
    });


来源:https://stackoverflow.com/questions/2062110/ckeditor-calling-the-fullscreen-action-outside-of-the-ckeditor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!