I've been trying to add TinyMCE editor to my WordPress plugin. I'm aware that we can use the wp_editor() function to achieve this but it doesn't work when I call it via ajax. I've tried a few solutions for it but then managed to make it work directly.
The issue I'm having now is that it's giving an error for the 'code' plugin.
Here is the code for tinymce:
tinymce.init({
menubar: false,
selector: '#p_' + r,
plugins: 'code',
skin_url: '../wp-includes/js/tinymce/skins/lightgray'
});
I'm getting this error on the editor:
Failed to initialize plugin: code
Console Errors:
PS: I've checked the plugins directory and the 'code' plugin folder is present i