Sha256: 94d43f1fa9622d3c9c8ff8efb8b6306cb8a3838f6e55df444d7651d967b88819
Contents?: true
Size: 783 Bytes
Versions: 12
Compression:
Stored size: 783 Bytes
Contents
$.fn.upload_maker = function(destination) { $(this).each(function() { //Get some vars var id = $(this).attr('id'); var image_input_id = id + '_image_url'; //write the iframe $(this).before('<iframe style="height: 1em;width:650px" src="'+destination+'&destination=' + image_input_id +'" frameborder="0"></iframe>'); //write hidden input $(this).after('<input id="' + image_input_id +'" name="' + image_input_id +'" style="position:absolute;left:-9999em" />'); $('#' + image_input_id).focus(function() { var url = $(this).val(); if (tinyMCE && (ed = tinyMCE.get(id))) { ed.execCommand('mceInsertContent', false, '<img src="' + url + '" alt="' + url + '" />'); } else { insertTag(id, '<img src="' + url + '" alt="' + url + '" />'); } }); }) }
Version data entries
12 entries across 12 versions & 2 rubygems