How to open new window in TinyMCE WindowManager?

How to open new window in TinyMCE WindowManager?

Closes the top most window. 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. Opens a new window. Opens a new window for the specified url. Creates an alert dialog.

How to display an alert box in TinyMCE?

// Displays an alert box using the active editors window manager instance tinymce.activeEditor.windowManager.alert(‘Hello world!’); message (String) – Text to display in the new alert dialog. callback (function) – (Optional) Callback function to be executed after the user has selected ok. Closes the top most window.

Are there any body types for windowmanager.open?

After I beautified the minified version of tinymce, i found that these may be some of the body types for windowManager.open. I’m not sure how to use them all, as all this info was gathered through trial and fail. Since the documentation is really bad, no real info can be gathered.

How to disable checkbox when listbox value changes in TinyMCE?

Also here’s a link which includes some good info on checkbox. https://wordpress.stackexchange.com/questions/172853/how-disable-checkbox-when-listbox-value-changes-in-tinymce It took me an hour or so to check and test all so I really hope this will save you the trouble of doing it yourself.

How to create a TinyMCE custom dialog plugin?

The main parts in a plugin is explained with this image: Use tinymce.PluginManager.addto register addCommandis used for you custom logic addButtonto add your button to toolbar monitorNodeChangeis non mandatory, where you can put logic for enabling/disabling your button editor.addCommand && editor.windowManager.open

Where is the TinyMCE button in WordPress editor?

This button happens to be a menu (menubutton) with three menu items. Each menu item has an onclick event listener that then executes a tinymce command. The commands are registered just below the menu code. Right now the commands are simply inserting text into the WordPress editor as shortcodes.

How does a custom type button in TinyMCE work?

A Custom type button will invoke the onAction callback function, and pass it the button’s name in the details object. This allows developers to create a click handler for each Custom type footer button in the dialog.