Adding a new tab to the LINK dialog is easy enough ( i.e., CKEDITOR.on( 'dialogDefinition', function( ev ) { ... } ) ), but less obvious is, when you add fields to that new tab, how do you:
- inject those fields as attributes into the resulting <a> tag?
- populate those fields when editing the <a> link?
For example, let's say you have a new tab called "Analytics", and you want to add an attribute called "data-id" with the value of a text field on this tab. How would you do the items above?
It would seem that the element's "setup" and "commit" options come into play somehow, but with the LINK plugin already doing its own thing with onOk and onShow, it is not obvious how we might add new fields to the LINK dialog, commit them to the <a> as I described, and retrieve them when editing the <a> again...
Right now to solve this, I've downloaded the LINK plugin source (link.js) and made a couple manual changes directly in the source code, but that means if I ever update CKEditor again, I'll lose my updates....