![]() However, I'm trying to set up a field which is a rich text editor in the dialog box but having some trouble getting it to initialise properly. This is all working great, the shortcode is created properly and inserted in to the main WP editor. tox-dialog, like this: var dialogApi editor. I'm trying to figure out how I can also close my plugin's. I did a bit more digging and found some sort of workaround, after windowManager.open() use the DomQuery utils to add a custom class to the created. That popup can be closed by (1) clicking the 'Cancel' or 'OK' buttons, or (2) pressing the esc key. When clicked, it opens a popup window via (). I've created a small plugin which adds a button to the TinyMCE toolbar. I'll log an internal documentation task to get that specific detail added to the migration guide.I'm currently writing a plugin that provides an interface for adding shortcodes, very simple dropdown added to the TinyMCE toolbar which opens a TinyMCE dialog box with text fields etc. Close TinyMCE plugin window on click away. If you do need to access a global from the parent window, then I'd suggest doing something similar like what demo'd above by binding a function to the window object when opening the dialog. This is described by The dialog can also be closed by clicking the 'X' in the top right corner. The dialog can be closed manually by using windowManager.close (). When clicked, it opens a popup window via (). tinymce.PluginManager will open a dialog using windowManager.open (). ![]() I should also note that the new URL dialog API doesn't support passing parameters when opening the dialog either (similar to the regular dialogs), so the getParams API wasn't reinstated. 1 I've created a small plugin which adds a button to the TinyMCE toolbar. The documentation for the new URL dialog functionality can be found here. I use the windowmanager.open () function to show a modal, but I dont know how to hide the ok button in this modal. Since then, we've brought back URL dialog functionality but in a hopefully more modern way, such as communicating via window.postMessage() instead of relying on accessing globals from a parent frame, where a new dialog may or may not have opened. Tinymce Windowmanager.open () Parameters Ask Question Asked 6 years, 10 months ago Modified 6 years, 10 months ago Viewed 7k times 4 I use wordpress and currently writing a plugin for the tinymce-editor. 1 Answer Sorted by: 0 You may use this (no tinymce solution) window.open (url + '/youtube.htm', 'mywindow','resizable1,inline1,width'+320 + parseInt (ed.getLang ('ltawidth', 0))+'height'+120 + parseInt (ed. ![]() The former is for accessing editor settings, while the latter was used in TinyMCE 4 to get params passed when opening URL dialogs.Īnyways, URL dialogs were originally removed in TinyMCE 5 and as such all the windowManager functionality that related to URL dialogs (eg ()) was also removed. windowManager. Just to clarify editor.getParam() is not the same as (). This class can be extended to provide for example inline dialogs. File_picker_callback: function ( callback, value, meta ) , Brilliant v5 feels, looks and behaves beautifully. open () openUrl () tinymce.WindowManager This class handles the creation of native windows and dialogs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |