Hi guys!
Can you help with highslide plugin for ckeditor? I just installed it and it's just fine apart from one issue. It replaces original link to a picture with it's own putting into "href=" and "src=" link to the same file. I just want it to leave it like below:
<a href="my image.jpg" class="highslide" onclick="return hs.expand(this)"> <img id="name" border="0" src="small image.jpg" /> </a>
Probably it's a matter of changing $[3] variable (below), but unfortunatelly I do not know JS and I am quite poor in regexps too.
str = str.replace(/^|(<a\b[^>]*>)?\s*(<img\b[^/>]*(?:src=("[^"]*"|'[^']*'|\S+))[^>]*>)\s*(?:<\/a>)?/ig, function() { var $ = arguments; if ($[0].length) { return [ '<a href=' + $[3] + ' class="highslide" onclick="return hs.expand(this)">' , '<img src=' + $[3] + ' alt="Highslide JS" title="Click to enlarge image"></a>' ].join("\r\n"); } else {return JSVar;} });
Can you help me?
Ok - I rebuilt regexp like
Ok - I rebuilt regexp like this:
and I catch $2 and $2.