SHARE
TWEET

Untitled

a guest Apr 23rd, 2014 138 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         e.editor.on( 'simpleuploads.finishedUpload' , function(ev)
  2.         {
  3.                 var element = ev.data.element;
  4.                 if (element.getName() == 'img')
  5.                 {
  6.                         var img = element.$,
  7.                                 doc = img.ownerDocument,
  8.                                 link = doc.createElement('a');
  9.                         link.setAttribute('href', img.src);
  10.                         link.setAttribute('data-cke-href', img.src);
  11.                         img.parentNode.replaceChild(link, img);
  12.                         link.appendChild(img);
  13.                 }
  14.         });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top