TinyMCE:API/tinymce.WindowManager
From Moxiecode Documentation Wiki
Contents |
[edit]
Class: tinymce.WindowManager
This class handles the creation of native windows and dialogs. This class can be extended to provide for example inline dialogs.
[edit]
Constructor
- WindowManager
- Constructs a new window manager instance.
[edit]
Methods
- alert
- Creates a alert dialog.
- close
- Closes the specified window.
- confirm
- Creates a confirm dialog.
- createInstance
- Creates a instance of a class for the opened document.
- open
- Opens a new window.
[edit]
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
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");
});
