title: TinyMCE Failed to initialize plugin: code error in wordpress
body: <p>I've been trying to add TinyMCE editor to my WordPress plugin. I'm aware that we can use the <code>wp_editor()</code> 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.</p>
  <p>The issue I'm having now is that it's giving an error for the 'code' plugin.</p>
  <p>Here is the code for tinymce:</p>
  <pre><code>tinymce.init({
          menubar: false,
          selector: '#p_' + r,
          plugins: 'code',
          skin_url: '../wp-includes/js/tinymce/skins/lightgray'
      });
  </code></pre>
  <p>I'm getting this error on the editor:</p>
  <blockquote>
  <p><code>Failed to initialize plugin: code</code></p>
  </blockquote>
  <p>Console Errors:</p>
  <p><a href="https://i.stack.imgur.com/BoaKa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BoaKa.png" alt="enter image description here" /></a></p>
  <p>PS: I've checked the plugins directory and the 'code' plugin folder is present i</p>