JSFiddle - React, Tailwind, and code Playground

by Dogbert

HTML

<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<textarea id="editor"></textarea>

JavaScript

Editor = tinymce.init({
  selector: 'textarea#editor',
  height: 300,
  removeformat: {
    selector: 'h1,h2,h3,h4,h5,h6',
    remove: 'all',
    split: true,
    expand: false,
    block_expand: true,
    deep: true
  },

  plugins: [
    'advlist autolink lists link image charmap anchor',
    'searchreplace visualblocks code fullscreen',
    'insertdatetime media table contextmenu paste code'
  ],
  toolbar: 'insertfile undo redo | bold italic | bullist numlist outdent indent | link image | removeformat ',
  content_css: [
    '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
    '//www.tinymce.com/css/codepen.min.css'
  ],
  removed_menuitems: 'newdocument',
  menu: { // this is the complete default configuration
    file: {},
    edit: {
      title: 'Edit',
      items: 'undo redo | cut copy paste pastetext | selectall'
    },
    insert: {
      title: 'Insert',
      items: 'link media | template hr'
    },
    view: {
      title: 'View',
      items: 'visualaid'
    },
    format: {
      title: 'Format',
      items: 'bold italic underline strikethrough superscript subscript | | removeformat'
    },
    table: {
      title: 'Table',
      items: 'inserttable tableprops deletetable | cell row column'
    },
    tools: {
      title: 'Tools',
      items: 'spellchecker code'
    }
  }
});