Is there a way to use Cloudinary image upload inside my own custom TinyMCE plugin?
The way I am working with custom plugins is having the plugin path inside keystone.init({})
external_plugins: {
'example':'/plugins/example/plugin.min.js'
},...
and then creating the plugin and the dialog window like that:
tinymce.PluginManager.add('example', function(editor) {
editor.addMenuItem('example1', {
text: 'Example plugin #1',
context: 'insert',
onclick: function() {
editor.windowManager.open({
title: 'Example plugin №1',
body: [
{type: 'textbox', name: 'title', label: 'Title'},
{type: '???', name: 'img', label: 'Image' }
],
onsubmit: function(e) {
editor.insertContent("<my-custom-component data-img=" + e.data.img + '>" + e.data.title + "</my-custom-component>");
}
});
}
});...
The question is whether (and how) I can let my plugin know about the CloudinaryImage type. It is available to the TinyMCE editor but how can I make one plugin available to another external plugin?