Jump to content

Ckeditor : Trying to install Link addon (for anchor)

Recommended Posts

Hello !

I've installed Link addon from CKEditor website because I would like to use anchor but I have two issue.

First, I can't disable the default popin when i double click on a link 



Second, if i create an anchor with the new addon when I submit the post, the ID is removed from the <a>.

Someone tried to install this addon ? Any idea ?

Link to comment
Share on other sites

Well. Issue solved

First i've made a plugin for extend IPS\Text\Parser and add : 

	 * Get HTML Purifier Configuration
	 * @param	callback			$callback	A function which will be passed the HTMLPurifier_Config object to customise it
	 * @return	\HTMLPurifier_Config
	protected function _htmlPurifierConfiguration( $callback=NULL )
		$config  = parent::_htmlPurifierConfiguration(function($config){
			// Adding name attribute for link and anchor work
			$config->set('HTML.Attr.Name.UseCDATA', true);

		return $config;

And in forum/applicaitons/core/interface/ckeditor/plugins/ipslink/plugin.js, i used a javascript beautifuler and added return to  : 

c.on("doubleclick", function(a) {
			a = CKEDITOR.plugins.ipslink.getSelectedLink(c) || a.data.element;
			if (!a.isReadOnly() && a.is("a") && a.getAttribute("href")) {
				var b = !1;
				if (1 == a.getChildCount())
					for (var f = a.getChildren(), d = 0; d < f.count(); d++) {
						var e =
						if (e.$.nodeType == e.$.ELEMENT_NODE && e.is("img")) {
							b = !0;
				b || (c.getSelection().selectElement(a), c.execCommand("ipsLink"))


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...