I don't think it's possible to do this without editing the source code. The CKE api framework allows you to add form elements like combo boxes etc but you don't have control over where they appear and certainly can't script changes in combo elements to show and hide other elements which is what I needed.
This customised link.js dialog dialog definition will most likely survive any update of the CKE core. Any changes made to the plugin definition framework in future updates of CKE core would then require all exisitng plugins to be re-worked, which I think very unlikely. It would just be a case of performing the update and then replacing the newly updated version of link.js with the customised version. Future enhancements to the exisitng link.js could be merged with this customisation fairly easily. In fact in that event I will be doing those merges for myself and can post them here.
I found myself in a similar situation and had a hard time trying to figure out how to get this working. After going through source files for the link plugin and the API docs I was able to get it done without replacing the compressed link.js file. I made all my edits in my custom config.js file.
Only downside seems to be controlling visibility of items as mentioned above. Instead of a button I just added my custom URL type option to the "Link Type" drop down and it worked. I would definitely recommend avoiding replacing the compressed files with source files if at all possible keeping future upgrades in mind.
I created a plugin based on xoundboy's work. This version works with ckeditor 4.2.2.
it gives CKEditor4 the ability to link to local (CMS) pages. Rely on jQuery for ajax calls. Internationalization ready (at realase time, only available in english and french, see readme file for more information).
Re: Adding a ‘Link to local page from site’ field - HOW TO
http://cksource.com/forums/viewtopic.php?f=11&t=20800
Re: Adding a ‘Link to local page from site’ field - HOW TO
This customised link.js dialog dialog definition will most likely survive any update of the CKE core. Any changes made to the plugin definition framework in future updates of CKE core would then require all exisitng plugins to be re-worked, which I think very unlikely. It would just be a case of performing the update and then replacing the newly updated version of link.js with the customised version. Future enhancements to the exisitng link.js could be merged with this customisation fairly easily. In fact in that event I will be doing those merges for myself and can post them here.
Re: Adding a ‘Link to local page from site’ field - HOW TO
Only downside seems to be controlling visibility of items as mentioned above. Instead of a button I just added my custom URL type option to the "Link Type" drop down and it worked. I would definitely recommend avoiding replacing the compressed files with source files if at all possible keeping future upgrades in mind.
working version with ckeditor 4.2.2
Hi,
I created a plugin based on xoundboy's work. This version works with ckeditor 4.2.2.
it gives CKEditor4 the ability to link to local (CMS) pages. Rely on jQuery for ajax calls. Internationalization ready (at realase time, only available in english and french, see readme file for more information).
You will be be able to download and fork it from : https://github.com/simogeo/ckeditor-adv_link
Install instructions are in readme file.