TinyMce Get Instance

Javascript

tinymce.init({
    selector: "textarea",
    plugins: [
        "advlist autolink lists link image charmap print preview anchor",
        "searchreplace visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste"
    ],
    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
	setup: function (editor) {
        editor.on('init', function () {
			 this.setContent('The init function knows on which editor its called - this is for ' + editor.id);
        });
	}
});

HTML

<form method="post" action="dump.php">
	<textarea class='tiny-mce' name='editor1'></textarea>
    <textarea class='tiny-mce' id='editor2'></textarea>  
</form>

Reference:

  1. https://stackoverflow.com/questions/36383626/how-do-i-get-tinymce-editor-instance-by-the-element-selector/36386886