JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<textarea></textarea>
JavaScript
tinymce.init({
selector: "textarea",
setup: function(editor) {
editor.addButton('button', {
type: 'menubutton',
text: 'button',
icon: false,
menu: [
{ text:'Paper Size', onclick: function()
{
editor.windowManager.open({
title: 'Paper Size',
width : 200,
height : 100,
body: [
{type: 'radio', name: 'letter', label: 'Letter'},
{type: 'radio', name: 'custom', label: 'Custom'},
],
onsubmit: function(e) {
editor.insertContent('Letter: ' + e.data.letter);
editor.insertContent('Custom: ' + e.data.custom);
}
});
}
}
]
});
},
toolbar: " button "
})