JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<textarea name="content"></textarea>
JavaScript
jQuery(document).ready(function () {
var h = window.innerHeight - 180;
var resizeHeight = h + "px";
var w = window.innerWidth - 80;
var resizeWidth = w + "px";
tinymce.init({
mode : "textareas",
height : h+30,
code_dialog_width : w,
code_dialog_height : h,
entity_encoding : "raw",
paste_auto_cleanup_on_paste : false,
force_p_newlines : true,
forced_root_block : false,
valid_elements : "*[*]",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor"
],
toolbar: "insertfile undo redo | styleselect template | formath1 formath2 formath3 formathP | bold italic underline strikethrough superscript subscript | forecolor backcolor removeformat | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | emoticons link image code",
image_advtab: true,
templates: [
{title: 'Paragrafo titolato', description: 'Paragrafo con titolo iniziale', content: '<h3>TITOLO</h3><p>paragrafo</p>'},
{title: 'Elenco puntato con titolo', description: 'Elenco puntato con titolo iniziale', content: '<h3>ELENCO PUNTATO</h3><ul><li>uno</li><li>due</li><li>tre</li></ul>'},
{title: 'Elenco numerato con titolo', description: 'Elenco numerato con titolo iniziale', content: '<h3>ELENCO NUMERATO</h3><ol><li>uno</li><li>due</li><li>tre</li></ol>'}
],
oninit: function () {
tinymce.get('textarea').execCommand('mceFullScreen');
},
setup : function(ed) {
ed.on('PostProcess', function(ed) {
//alert(ed.content);
// we are cleaning empty paragraphes
ed.content =...