title: Modify CKEditor link dialog to add custom attribute to links
body: <p>I am using CKEditor on a website and I need to be able to put a special data attributes on some of the links created through the editor. The user would indicate that they need the special attribute put on the link by checking a checkbox in the link dialog. I have managed to add a checkbox to the link dialog with the following code:</p>
  
  <pre><code>CKEDITOR.on('dialogDefinition', function(ev) {
      if (ev.data.name == "link") {
          var info = dialog.getContents("info");
          info.elements.push({
              type: "vbox",
              id: "urlOptions",
              children: [{
                  type: "hbox",
                  children: [{
                      id: "button",
                      type: "checkbox",
                      label: "Button",
                      commit: function(data) {
                          data.button = this.getValue()
                          console.log("commit", data.button, data);
                      },
                      setup: function(data) {
                          this.setValue(data.button);
                          console.log("setup", data.button, data);
                      }
                  }]
              }]
          });
      }
  });
  </code></pre>
  
  <p>Now I have two problems. The first one is that despite me adding the code in the <code>commit</code> and <code>setup</code> functions that should save the state of the checkbox, it's not working. It's as if the <code>data</code> can't hold any other parameters but the ones there by default.</p>
  
  <p>The second problem is that I don't know how to add / remove the data attribute on my links. It seems to me that I should be doing that in my <code>onOk</code> callback on the dialog, however, the link dialog already has an <code>onOk</code> callback, so I'm not sure how I should be proceeding. I, of course, do not want to modify any of CKEditor's files directly.</p>
  
  <p>How can I accomplish these things?</p>