title: Tinymce custom plugin
body: <p>A client asked me to make a plugin to insert phone links, I know this can be done through the link plugin but he wants one specifically designed to do this. I already have the plugin with the popup window where you can insert the data you need, here is the code, what I want is to add the same functionality that has the link plugin so when the user clicks over the linked text the content can be edited inside the window manager of my plugin.</p>
  
  <p>This is the code i have so far:</p>
  
  <pre><code>tinymce.PluginManager.add('phonelink', function(editor, url) {  
  // Add a button that opens a window
    tinymce.DOM.loadCSS(url + '/css/phonelink.css');
    editor.addButton('phonelink', {
      text: false,
      icon: 'phonelink',
      onclick: function() {
        // Open window
        editor.windowManager.open({
          title: 'Enlace teléfono',
          body: [
            {type: 'textbox', name: 'phone', label: 'Teléfono'},
            {type: 'textbox', name: 'showtext', label: 'Texto a mostrar'},
            {type: 'textbox', name: 'title', label: 'Título'}
          ],
          onsubmit: function(e) {
            // Insert content when the window form is submitted
            editor.insertContent('&lt;a title="' + e.data.title + '" href="tel:+34' + e.data.phone + '"&gt;' + e.data.showtext + '&lt;/a&gt;');
          }
        });
      }
    });
  
    // Adds a menu item to the tools menu
    editor.addMenuItem('phonelink', {
      text: 'Teléfono',
      context: 'tools',
      onclick: function() {
        // Open window with a specific url
        editor.windowManager.open({
            title: 'Enlace teléfono',
            body: [
              {type: 'textbox', name: 'phone', label: 'Teléfono'},
              {type: 'textbox', name: 'showtext', label: 'Texto a mostrar'},
              {type: 'textbox', name: 'title', label: 'Título'}
            ],
            onsubmit: function(e) {
              // Insert content when the window form is submitted
              editor.insertContent('&lt;a title="' + e.data.title + '" href="tel:+34' + e.data.phone + '"&gt;' + e.data.showtext + '&lt;/a&gt;');
            }
        });
      }
    });
  });
  </code></pre>