Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Alexis Compain Posted May 18, 2017 Posted May 18, 2017 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 ?
Joy Rex Posted May 18, 2017 Posted May 18, 2017 It looks like the addon is conflicting with IPS own built-in link addon...
Alexis Compain Posted May 18, 2017 Author Posted May 18, 2017 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) { // HERE RETURN return; 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 = f.getItem(d); if (e.$.nodeType == e.$.ELEMENT_NODE && e.is("img")) { b = !0; break } } b || (c.getSelection().selectElement(a), c.execCommand("ipsLink")) } });
Recommended Posts
Archived
This topic is now archived and is closed to further replies.