JSFiddle - React, Tailwind, and code Playground

by 1eddy87

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdn.tinymce.com/4/tinymce.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal</button>

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title" id="exampleModalLabel">Click on the link/image icons and try to click on the inputs</h4>
      </div>
      <div class="modal-body">
        <textarea id="mitextarea"></textarea>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>

JavaScript

tinymce.init({
  selector: '#mitextarea',
  menubar: false,
  theme: "modern",
  height: 250,
  plugins: [
    'advlist autolink lists link image preview hr',
    'table contextmenu paste code textcolor colorpicker textpattern'
  ],
  toolbar1: 'bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | hr',
  toolbar2: 'forecolor backcolor link image | styleselect table | preview'
});

// Uncomment the code below and it will start working however, I start to get the too much recursion errors showing in the console

/*
$(document).on('focusin', '.mce-textbox', function() {
	$(this).focus();
});
*/