I am using jQuery tinyMCE to populate dynamically generated text areas with tiny MCE editors.
When I use the WordPress wp_editor
function before I call the jQuery version, I have no issues. If I do not, I get;
Uncaught ReferenceError: tinymce is not defined
As a dreadful hack, I have used;
wp_editor('hacky', 'hackhack');
wp_register_script('admin_js', get_template_directory_uri() . '/assets/js/admin.min.js', array());
wp_enqueue_script('admin_js');
Which allows the jQuery TinyMCE to work. I wish to eliminate this. Thinking WP wasn't loading the jQuery version (and not knowing a good way to get the path of WP-includes
) I used;
?><script type="text/javascript"src="//cdnjs.cloudflare.com/ajax/libs/tinymce/4.1.7/jquery.tinymce.min.js"></script><?php
wp_register_script('admin_js', get_template_directory_uri() . '/assets/js/admin.min.js', array());
wp_enqueue_script('admin_js');
But this doesn't seem to be the issue. It seems that the WP version loads the required files I need - except I do not know what files I need.