Ok, the answer to this question really aught to be a whole lot easier if I could just find the relevant information within TinyMCE's documentation, but I cannot. What I want to do is the following:
So basically, all I really need is to know how to make the popup work, at least for now. Trouble is: searching by "tinymce popup," "tinymce dialog" "tinymce prompt user" all come up with nothing useful that I can see.
The tutorials for how to create a dialog/prompt in TinyMCE have moved and some of the examples of how to do this since vanished. There is a new tutorial that covers creating plugins and dialogs for TinyMCE 4.
The relevant part is:
// Open window
editor.windowManager.open({
title: 'Example plugin',
body: [
{type: 'textbox', name: 'title', label: 'Title'}
],
onsubmit: function(e) {
// Insert content when the window form is submitted
editor.insertContent('Title: ' + e.data.title);
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With