当前位置: 首页 > 文档资料 > tinyMCE 帮助文档 >

tinymce-WindowManager

优质
小牛编辑
125浏览
2023-12-01

Examples

// Opens a new dialog with the file.htm file and the size 320x240
// It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog.
tinymce.activeEditor.windowManager.open({
   url: 'file.htm',
   width: 320,
   height: 240
}, {
   custom_param: 1
});

// Displays an alert box using the active editors window manager instance
tinymce.activeEditor.windowManager.alert('Hello world!');

// Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm
});

Methods

namesummarydefined by
alert()Creates a alert dialog. Please don't use the blocking behavior of this native version use the callback method instead then it can be extended.tinymce.WindowManager
close()Closes the top most window.tinymce.WindowManager
confirm()Creates a confirm dialog. Please don't use the blocking behavior of this native version use the callback method instead then it can be extended.tinymce.WindowManager
open()Opens a new window.tinymce.WindowManager

Methods

alert

alert(message:String, callback:function, scope:Object)

Creates a alert dialog. Please don't use the blocking behavior of this native version use the callback method instead then it can be extended.

Examples
// Displays an alert box using the active editors window manager instance
tinymce.activeEditor.windowManager.alert('Hello world!');
Parameters
  • message (String) - Text to display in the new alert dialog.
  • callback (function) - Callback function to be executed after the user has selected ok.
  • scope (Object) - Optional scope to execute the callback in.

close

close()

Closes the top most window.

confirm

confirm(message:String, callback:function, scope:Object)

Creates a confirm dialog. Please don't use the blocking behavior of this native version use the callback method instead then it can be extended.

Examples
// Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm
tinymce.activeEditor.windowManager.confirm("Do you want to do something", function(s) {
   if (s)
      tinymce.activeEditor.windowManager.alert("Ok");
   else
      tinymce.activeEditor.windowManager.alert("Cancel");
});
Parameters
  • message (String) - Text to display in the new confirm dialog.
  • callback (function) - Callback function to be executed after the user has selected ok or cancel.
  • scope (Object) - Optional scope to execute the callback in.

open

open(args:Object, params:Object)

Opens a new window.

Parameters
  • args (Object) - Optional name/value settings collection contains things like width/height/url etc.
  • params (Object) - Options like title, file, width, height etc.

Can't find what you're looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.

最后更新:

类似资料

  • 问题内容: 有什么方法可以使用Animation在Android的项目中使用WindowManager扩展视图吗?即使使用网站中的示例,我也做不到!我使用了许多示例,但没有一个有效! 问题答案: 我不确定您的任务的确切要求,但是有两种方法可以向窗口提供动画: 用法如下: 添加附加的“容器”视图,因为它不是真实的,因此添加视图的普通动画无法使用。已经问过这个问题,但是缺少代码。我将通过以下方式应用它

  • 本文向大家介绍Android使用WindowManager构造悬浮view,包括了Android使用WindowManager构造悬浮view的使用技巧和注意事项,需要的朋友参考一下 一般在android显示一个View都是通过Activity的setContentView设置的,但是还有一种方法,可以直接使用WindowManager在整个应用的最上层绘制我们需要显示的view,总体的效果类似于

  • 主要内容:本节引言:,1.WindowManager的一些概念:,2.WindowManager使用实例:,3.文献扩展:,4.本节代码示例下载:,本节小结:本节引言: 本节给大家带来的Android给我们提供的系统服务中的——WindowManager(窗口管理服务), 它是显示View的最底层,Toast,Activity,Dialog的底层都用到了这个WindowManager, 他是全局的!该类的核心无非:调用addView,removeView,updateViewLayout这几个方

  • 我正在向运行的activity添加一个带有WindowManager的相机覆盖。当我启动相机并调用WindowManager时,它将我的屏幕从纵向变为横向,即使我为WindowManager.LayoutParams分配了适当的纵向标记。还没能通过谷歌找到任何解决方案。 下面是我在服务中的方法中运行的WindowManager代码: 布局r.layout.camera只是我将相机添加到的Frame

  • 风格: 日志消息:10-10 13:20:01.184:E/AndroidRuntime(1417):致命异常:main 10-10 13:20:01.184:E/AndroidRuntime(1417):android。看法WindowManager$BadTokenException:无法添加窗口--android令牌。应用程序。本地活动管理器$LocalActivityRecord@411e

  • 本文向大家介绍Android自定义Toast之WindowManager,包括了Android自定义Toast之WindowManager的使用技巧和注意事项,需要的朋友参考一下 本文为大家分享了Android自定义Toast之WindowManager,供大家参考,具体内容如下 Toast:WindowManager 三个重要的API: public void addView(View view