CKEDITOR,在 CKEDITOR 之外调用全屏操作

发布于 2024-08-18 04:27:00 字数 77 浏览 4 评论 0原文

有 CKEDitor 经验的人都知道是否可以使用 JavaScript 在 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

情深缘浅 2024-08-25 04:27:00

我认为这是可能的,您是否尝试过这里的解决方案:
http://cksource.com/forums/viewtopic.php?f=11& ;t=14319

可能是这样的:

var editor = CKEDITOR.instances[instanceName];
editor.execCommand('maximize');

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');
天暗了我发光 2024-08-25 04:27:00

我测试了@Magicgunnar,但在理解它和运行(触发的时刻)它时遇到了问题(!)。这段代码更加不言自明并且正确。针对 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');
   }
 );

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');
   }
 );
绝不放开 2024-08-25 04:27:00

如果使用 ckeditor 的 jquery 版本,下面的代码可以完美运行

$(".fullscreen_link").live("click", function () {
        var editor = $('.my_ckeditor').ckeditorGet();
               editor.execCommand('maximize');
    });

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');
    });
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文