Estoy tratando de desarrollar un complemento TinyMCE personalizado que cargará los elementos para una lista de cuadro de selección en función de las opciones de otra lista de cuadro de selección. Sin embargo, no puedo averiguar cómo detectar ninguno incluso en la lista del cuadro de selección.
La documentación es casi completamente inútil, ya que no menciona las opciones de complementos personalizados, solo el código repetitivo para comenzar.
¿Cómo puedo detectar un evento onchange cuando se modifica la selección de las listas de selección?
tinymce.PluginManager.add('custom', function(editor, url) { var openDialog = function () { return editor.windowManager.open({ title: 'Custom', body: { type: 'panel', items: [ { type: 'selectbox', name: 'options', label: 'Options', items: [ {text: 'Primary', value: 'primay style'}, {text: 'Success', value: 'success style'}, {text: 'Error', value: 'error style'} ], onchange: function() { alert('hi'); }, flex: true, }, { type: 'selectbox', name: 'selection', label: 'Selection', items: [ ], flex:true, } ] }, buttons: [ { type: 'cancel', text: 'Close' }, { type: 'submit', text: 'Save', primary: true }, ], onSubmit: function (api) { var data = api.getData(); /* Insert content when the window form is submitted */ editor.insertContent(data); api.close(); } }); }; /* Add a button that opens a window */ editor.ui.registry.addButton('custom', { text: 'Custom', onAction: function () { /* Open window */ openDialog(); } }); /* Adds a menu item, which can then be included in any menu via the menu/menubar configuration */ editor.ui.registry.addMenuItem('custom', { text: 'Custom', onAction: function() { /* Open window */ openDialog(); } }); /* Return the metadata for the help plugin */ return { getMetadata: function () { return { name: 'Example plugin', url: 'http://exampleplugindocsurl.com' }; } }; });