title: Custom Plugin, in Custom Directory for TinyMCE jQuery plugin
body: <p>Im currently trying to write a custom plugin for tinyMCE, and load the plugin from another url.</p>
  
  <p><a href="http://www.tinymce.com/wiki.php/Tutorials:Creating_a_plugin" rel="nofollow noreferrer">http://www.tinymce.com/wiki.php/Tutorials:Creating_a_plugin</a></p>
  
  <p>However, my tinyMCE uses the jQuery plugin for init, and as such I'm finding it difficult to get tinyMCE to load it. </p>
  
  <p>This stackoverflow question illustrates my exact problem , however doesn't seem to have a resolution</p>
  
  <p><a href="https://stackoverflow.com/questions/9197924/create-and-register-tinymce-plugin-with-jquery">Create and register TinyMCE plugin with jQuery</a></p>
  
  <p>Anyone any idea how to do this? Below is my example plugin inside an anon function. </p>
  
  <pre><code>(function() {
  
      var tinymce = $('textarea.tinymce').tinymce();
  
      // Create a new plugin class
      tinymce.create('tinymce.plugins.ExamplePlugin', {
          init : function(ed, url) {
              // Register an example button
              ed.addButton('example', {
                  title : 'example.desc',
                  onclick : function() {
                       // Display an alert when the user clicks the button
                       ed.windowManager.alert('Hello world!');
                  },
                  'class' : 'bold' // Use the bold icon from the theme
              });
          }
      });
  
  
      // Register plugin with a short name
      // Register plugin with a short name
      tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);
  
  })();
  </code></pre>
  
  <p>Tried registering the plugin on init, but get a.load not defined.</p>
  
  <pre><code>oninit: function(ed) { 
              ed.PluginManager.load('filemanager', '/js/admin/pub/plugins/hr-core-class.js');
              }
  </code></pre>
  
  <p>Tried just including the file after the tinyMCE js directly, and adding the "plugin" to the plugins param. .TinyMCE continues to try and load it from the plugins folder. </p>