A CKEditor 4 link plugin adding the ability to link to local (CMS) pages. Rely on jQuery for ajax calls.
Tested with CKEditor 4.14.
I developed this script for my needs, it is inspired by this repository and this blog post.
-
Download and extract
adv_link
folder into CKEditor plugins folder -
Disable default link plugin and enable the new one. To do so, in your config.js file :
CKEDITOR.editorConfig = function(config) {
// Define changes to default configuration here.
config.removePlugins = 'link';
config.extraPlugins = 'adv_link';
// whatever
};
-
In
dialogs/links.js
file, find/pages.php
and set the URL of the page which generates inputs to populate the plugin. A sample PHP script is given insample
folder and can be a good start. -
Test your installation by using the plugin, if it does not work, use javascript debugging tool.
2 translations are defined in the language files:
localPage:'Local page',
selectPageLabel:'Select a page.',
Feel free to send pull requests!